lsof will do it

   [EMAIL PROTECTED] keys]$ sudo /usr/sbin/lsof -i TCP:http
   COMMAND     PID   USER   FD   TYPE  DEVICE SIZE NODE NAME
   ...
   httpd     22579   root    4u  IPv6 3172305       TCP *:http (LISTEN)
   httpd     22582 apache    4u  IPv6 3172305       TCP *:http (LISTEN)
   httpd     22583 apache    4u  IPv6 3172305       TCP *:http (LISTEN)
   httpd     22584 apache    4u  IPv6 3172305       TCP *:http (LISTEN)
   httpd     22585 apache    4u  IPv6 3172305       TCP *:http (LISTEN)
   httpd     22586 apache    4u  IPv6 3172305       TCP *:http (LISTEN)
   httpd     22587 apache    4u  IPv6 3172305       TCP *:http (LISTEN)
   httpd     22588 apache    4u  IPv6 3172305       TCP *:http (LISTEN)
   httpd     22589 apache    4u  IPv6 3172305       TCP *:http (LISTEN)


johno


Scott Ehrlich wrote:
On a Linux system, if a program claims that a port is in use (say I want to install a web server on port 80, but the web server claims port 80 is already in use, and a ps auwx doesn't show/claim a web server is running), is there a program that can tell me what application is using the port?

Yes, nmap will show ports, but the apps it shows are part of its own built-in database or /etc/services, so the app report isn't accurate.

netstat -a will show apps and their PIDs, then later what ports are open, but no direct port <-> app mapping.

Maybe there is a compilation of ssh server designed to listen on port 65530, and the daemon name is something I wouldn't expect, or it is invoked by some other application.

What tool can I use for real-time port <-> app mapping?

Thanks.

Scott

_______________________________________________
bblisa mailing list
[email protected]
http://www.bblisa.org/mailman/listinfo/bblisa

_______________________________________________
bblisa mailing list
[email protected]
http://www.bblisa.org/mailman/listinfo/bblisa

Reply via email to