Thursday, March 22, 2012

"find Perl TCP servers and clients"

> netstat -Ainet -anp | egrep perl
tcp        1      0      CLOSE_WAIT  19642/perl   

Process ID 19642 is a Perl process connecting to local port 8082.


netstat -lnp --tcp | egrep -i perl

"List all Perl servers listening to TCP ports".  The previous command would also give us clients and UDP -- the second command is shorter.