Re: looking for packages versions of running daemons
On 9/10/09, Cameron Hutchison <lists@xdna.net> wrote:
> Cameron Hutchison <lists@xdna.net> writes:
>
>>Israel Garcia <igalvarez@gmail.com> writes:
>>>On 9/10/09, Cameron Hutchison <lists@xdna.net> wrote:
>
>>>> Version 3 (below) is "properly" written, in a functional style. [...]
>
>>>Well, in version 3 I see no output when I run the script...I double
>>>check but I dont know where the problem is.
>
>>Hmmm, work for me (tm).
>
> Doh!. Cut'n'paste error. I left one line off the end. Add this line:
>
> main
Hi Cameron,
Absolutely right about the missing last line...
well that's exactly what I was looking for. :-)
One last detail and I want you to know I'm happy with this last
version of the script :-), BUT it seems when the script found
duplicate lines, like named/tcp and named/udp it only show one, se
below:
vps204:/usr/local/bin# netstat -lntup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 0.0.0.0:8000 0.0.0.0:*
LISTEN 9344/python
tcp 0 0 127.0.0.1:3306 0.0.0.0:*
LISTEN 18490/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 5027/monit
tcp 0 0 127.0.0.1:10000 0.0.0.0:*
LISTEN 14231/ruby
tcp 0 0 127.0.0.1:10001 0.0.0.0:*
LISTEN 14236/ruby
tcp 0 0 127.0.0.1:10002 0.0.0.0:*
LISTEN 14241/ruby
tcp 0 0 67.212.94.125:53 0.0.0.0:*
LISTEN 23874/named
tcp 0 0 127.0.0.1:53 0.0.0.0:*
LISTEN 23874/named
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN 16398/sshd
tcp 0 0 127.0.0.1:953 0.0.0.0:*
LISTEN 23874/named
tcp 0 0 127.0.0.1:25 0.0.0.0:*
LISTEN 4990/master
tcp 0 0 0.0.0.0:8089 0.0.0.0:*
LISTEN 9306/splunkd
tcp6 0 0 :::53 :::*
LISTEN 23874/named
tcp6 0 0 :::22 :::*
LISTEN 16398/sshd
tcp6 0 0 ::1:953 :::*
LISTEN 23874/named
udp 0 0 0.0.0.0:32918 0.0.0.0:*
16892/collectd
udp 0 0 67.212.94.125:53 0.0.0.0:*
23874/named
udp 0 0 127.0.0.1:53 0.0.0.0:*
23874/named
udp6 0 0 :::53 :::*
23874/named
And the script output:
vps204:/usr/local/bin# check2.sh
/usr/sbin/sshd on port 22/tcp from package openssh-server (version 1:5.1p1-5)
/usr/lib/postfix/master on port 25/tcp from package postfix (version 2.5.5-1.1)
/usr/sbin/named on port 53/tcp from package bind9 (version 1:9.5.1.dfsg.P3-1)
/usr/sbin/monit on port 80/tcp from package monit (version 1:5.0.3-3)
/usr/sbin/named on port 953/tcp from package bind9 (version 1:9.5.1.dfsg.P3-1)
/usr/sbin/mysqld on port 3306/tcp from package mysql-server-5.0
(version 5.0.51a-24+lenny2)
/opt/splunk/bin/python2.6 on port 8000/tcp from package splunk
(version 4.0.3-65638)
/opt/splunk/bin/splunkd on port 8089/tcp from package splunk (version
4.0.3-65638)
/usr/local/bin/ruby on port 10000/tcp
/usr/local/bin/ruby on port 10001/tcp
/usr/local/bin/ruby on port 10002/tcp
/usr/sbin/collectd on port 32918/udp from package collectd (version 4.7.2-1)
As you can see the output only show named 53/tcp.
Cameron, I really appreciate your help.
thanks a lot.
regards,
Israel.
>
> It's no good having functions if there's nothing to call them. :-)
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
>
>
--
Regards;
Israel Garcia
Reply to: