PCP script to find open TCP ports and PIDs related in Solaris
The PCP script works on Solaris 10/9/8 and can be downloaded from here. Simply save the pcp.txt file to your Solaris Server as a Shell scripts (say pcp.sh) and change permissions to execute.
# chmod 755 pcp.sh
PIDs for TCP Port
Run PCP with “-p” option to show the PIDs of processes having a TCP port (say Port 22)

For instance, to find PIDs opening TCP port 22.
TCP Ports open by PIDs
Run PCP with “-P” option to show the TCP ports open by specific PID
For instance, here I try to find the TCP ports open by PID 18805

All PIDs for all open TCP Ports
Use the “-a” option to list all TCP ports open with all the PIDs

Comments
3 Responses to “PCP script to find open TCP ports and PIDs related in Solaris”
Leave a Reply


Nice tool,
thanks for the hint!
how do i learn ur aplication on line. thanx
Good tool to use.
What is the difference between PCP scripts and PS commands?