Jan Kratochvil
Projects Products GIT Resume Contact
Projects
UNIX UNIX-devel Web Amiga MS-Windows MS-DOS Patches

 

netstat -p: Program name display for net-tools-1.50/netstat

After answering several questions on the mailing lists and several from my friends personally, I decided that there is missing some tool for GNU/Linux which would display PID (or simply the process) of the owner of some socket, either listening or communicating.


 

The typical problem is that some port is allocated and no one knows which program is holding it. Output of the new 'netstat' with the added option "-p" follows:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 lemming.ericsson.c:1022 atrey.karlin.mff.cun:22 ESTABLISHED 11940/ssh
tcp        0      0 *:3064                  *:*                     LISTEN      31208/proxyper
tcp        0      0 *:2064                  *:*                     LISTEN      31208/proxyper
tcp        0      0 lemming.ericsson:domain *:*                     LISTEN      11601/named

 


EOF