In solaris, how can you tell which process is binding to certain port? Given a limited user privilege, and no lsof available. Please let me know if you have the answer. In the meantime, I have to stick with the script written by Lubos Kosco:
# Get the process which listens on port
# $1 is the port we are looking for
if [ $# -lt 1 ]
echo "Please provide a port number parameter for this script"
echo "e.g. $0 22"
echo "Greping for your port, please be patient (CTRL+C breaks) ... "
for i in `ls /proc`
pfiles $i | grep AF_INET | grep $1
if [ $? -eq 0 ]
echo Is owned by pid $i
The original page is here. Thanks Lubos and thanks google.