Sponsored Content
Operating Systems Solaris How to check which process is holding up the ilde port Post 302434930 by fpmurphy on Monday 5th of July 2010 10:26:19 PM
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

 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
PMCONNECTLOGGER(3)					     Library Functions Manual						PMCONNECTLOGGER(3)

NAME
__pmConnectLogger - connect to a performance metrics logger control port C SYNOPSIS
#include <pcp/pmapi.h> #include <pcp/impl.h> int __pmConnectLogger(const char *hostname, int pid); cc ... -lpcp DESCRIPTION
Each instance of the Performance Co-Pilot (PCP) archive logger program pmlogger(1) supports a control port on which __pmControlLog(3) requests are received, and responses sent. Optionally, the pmlogger(1) instance may be designated the ``primary'' logger. __pmConnectLogger may be used to establish a control port connection to the pmlogger(1) instance identified by process id pid on the host hostname. One special case is supported; for the reserved pid value of PM_LOG_CONTROL_PORT the requested connection is to the control port for the ``primary'' logger, whatever its process id might be. On success, __pmConnectLogger returns a non-negative integer, that is a file descriptor that may be used in subsequent communication with the pmlogger(1) instance, e.g. for __pmControlLog(3). As the control port to pmlogger(1) is not mulitplexed, applications using __pmConnectLogger should use close(2) to terminate the connection to pmlogger(1) as soon as they have finished communicating. If the application connects, and the pmlogger(1) instance subsequently terminates, e.g. because the associated pmcd(1) instance is termi- nated, the application will have to explicitly re-establish connection to a re-started pmlogger(1) instance by calling __pmConnectLogger again. SEE ALSO
pmcd(1), pmlc(1), pmlogger(1), PMAPI(3) and __pmControlLog(3). DIAGNOSTICS
PM_ERR_PERMISSION no permission to connect to the specified pmlogger(1) instance -ECONNREFUSED the designated pmlogger(1) instance does not exist -EEADDRINUSE the requested control port is already in use Performance Co-Pilot PCP PMCONNECTLOGGER(3)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy