How to check which process is holding up the ilde port


 
Thread Tools Search this Thread
Operating Systems Solaris How to check which process is holding up the ilde port
# 1  
Old 07-05-2010
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.

Code:
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
# 2  
Old 07-05-2010
The /proc utilities should help here. Try the following as root:
Code:
#!/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

# 3  
Old 07-06-2010
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
# 4  
Old 07-06-2010
None that I am aware of.
# 5  
Old 07-12-2010
you can use lsof..!
# 6  
Old 07-12-2010
Thanks for all the repleis
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to find process holding a semaphore?

Hello All, The system concerned has multiple processes communicating with each other using shared memory. These processes use semaphores to protect data being used amongst them. The "key" would uniquely identifies the particular semaphore corresponding to a resource for the various processes. ... (2 Replies)
Discussion started by: saptarshi
2 Replies

2. Solaris

Process holding /tmp space, need to know the process details

Hi , In a server /tmp has almost reached 75% and i can see the File system utilization is 48Mb only , so i believe some process is using the /tmp space. I would like to know which process is using /tmp space. # df -h /tmp Filesystem size used avail capacity Mounted on swap ... (9 Replies)
Discussion started by: chidori
9 Replies

3. AIX

Wait process holding CPU

Hi all, Have this performance Issue, srvbd1]root]/]>ps vg | head -1 ; ps vg | grep -w wait PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND 8196 - A 4448:23 0 384 384 xx 0 0 12.8 0.0 wait 53274 - A 4179:28 0 384 ... (9 Replies)
Discussion started by: gopeezere
9 Replies

4. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

5. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies

6. Shell Programming and Scripting

Perl- check the port used

hi everybody; my code is cheking if a port is an actif or not with the cmd netstat -ln,I want first to enter the number of the port which I want to check it but I think that the value of $con in the second "if" is always "0" so the code give me always that the port is not used!!! ... (5 Replies)
Discussion started by: bassma
5 Replies

7. UNIX for Advanced & Expert Users

Which port is used by which process ?

Hi all, I work in three platforms SOLARIS,HPUX,AIX. My requirement is to find the user id which is using a particular port. So I tried searching commands which will help me to know which port is used by which process. According to the posts over here lsof makes life easy in this case. But I... (4 Replies)
Discussion started by: vikasrout
4 Replies

8. UNIX for Dummies Questions & Answers

How do you check whether a port currently being used?

Hi, Please help me out, how to check whether a port currently being used or not. is there any command which give the result? Thanks Rajesh (6 Replies)
Discussion started by: rajesh08
6 Replies

9. AIX

Process ID using IP Port

Is there a way in AIX to determine which process is connected to a particular IP port? I know about the lsof command, but for various reasons I can't install it on the machine I want to use it on. Is there a way other than using this command? (1 Reply)
Discussion started by: dgiaimo
1 Replies

10. Solaris

Which process is on which port....

Is there a way in Solaris to find which process is using which port? (3 Replies)
Discussion started by: Kraas
3 Replies
Login or Register to Ask a Question