March 2010
1 post
Lovely command to obtain the processes (or rather, PID) using a socket port (here 23) on AIX: $ netstat -Aan | egrep '\.23 ' | awk '{print $1}' | \ sed -e 's/^\(.*\)$/sockinfo \1 tcpcb/' | kdb | egrep '^pvproc' | awk '{print $4}' | sort | uniq | \ sed 's/^\(.*\)$/hcal \1/' | kdb | grep Value | awk '{print $6}' Useful when you don’t have lsof at hand.
Mar 29th