Netstat is used to find out about network connections on a unix box. If you pass in -lintp
you will get a listing of what processes are in a listening state on your machine and what interfaces they are listening on.
# netstat -luntp 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:993 0.0.0.0:* LISTEN 9050/dovecot tcp 0 0 0.0.0.0:2500 0.0.0.0:* LISTEN 15065/ruby1.8 tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN 943/inetd tcp 0 0 0.0.0.0:9 0.0.0.0:* LISTEN 943/inetd tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 9702/mysqld tcp 0 0 0.0.0.0:13 0.0.0.0:* LISTEN 943/inetd tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 15046/lighttpd tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 1689/perl tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 9330/master udp 0 0 0.0.0.0:9 0.0.0.0:* 943/inetd udp 0 0 0.0.0.0:10000 0.0.0.0:* 1689/perl
Hm looks like I need to turn inetd off, as I don’t use it. See how useful this command can be.
Eric Davis