How to check which process is holding up the ilde port

HI All

Am on Sun OS.While trying to start a process , we could see that the port is idle and we are not able to find the process holding that port.

Below is the result we get after using netstat command. lsof command is not yet installed in our machine.

netstat -a | grep "port no"
Error in log files : Couldnt bind to port "port no" for UDP wakeups

How do i get the culprit process holding up that idle port. netstat -p gives the PID of the process using that port but in case of idle ports???

Thanks
W

The /proc utilities should help here. Try the following as root:

#!/bin/sh

echo "Specify port to check?> \c"
read port

for pid in `ps -ef -o pid | tail +2` 
do
    foundport=`/usr/bin/pfiles $pid 2>&1 | grep "sockname:" | grep "port: $port"`
    [ -z "$foundport" ] || echo "MATCH: $pid, $foundport"
done

Thanks. Is there any other way where we can find the process holding that port without the root user ( We dont have the root password).

Thanks
W

None that I am aware of.

you can use lsof..!

Thanks for all the repleis