Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
root@server:~# sudo netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0  *               LISTEN      1548/nginx
tcp        0      0    *               LISTEN      1370/varnishd
tcp        0      0    *               LISTEN      1235/sshd
tcp        0      0  *               LISTEN      1421/sendmail: MTA:
tcp        0      0*               LISTEN      1349/varnishd
tcp        0      0*               LISTEN      1301/main.conf)
tcp        0      0*               LISTEN      1226/mysqld
tcp        0      0 *               LISTEN      1421/sendmail: MTA:
tcp        0      0*               LISTEN      1263/memcached
tcp6       0      0 :::8080                 :::*                    LISTEN      1548/nginx
tcp6       0      0 :::80                   :::*                    LISTEN      1370/varnishd
tcp6       0      0 :::22                   :::*                    LISTEN      1235/sshd
tcp6       0      0 ::1:6082                :::*                    LISTEN      1349/varnishd

It closes with "main.conf)" I am a newbe so obviously screwed up somewhere in the configuration file, just not sure it was. Any help?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The command

lsof  | grep "9000 (LISTEN)"

should give you the information which process/program uses the port.

If lsof is not already installed you can install it with

sudo apt-get install lsof
share|improve this answer
I get this with lsof: root@server:~# lsof | grep "9000 (LISTEN)" php5-fpm 1301 root 6u IPv4 1547331763 0t0 TCP localhost:9000 (LISTEN) –  bran May 6 '12 at 4:16
I wanted why it has a closing bracket at the end [1301/main.conf)] and if it is causing any problem? –  bran May 6 '12 at 4:18
If you use less /proc/1301/cmdline you get the full commandline of how the process was started. It is probably just the way the command is trimmed for the output. –  txwikinger May 6 '12 at 4:25
You are right. I get this: php-fpm: master process (/etc/php5/fpm/main.conf) Thanks! –  bran May 6 '12 at 4:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.