To find pid from port number


 
Thread Tools Search this Thread
Operating Systems HP-UX To find pid from port number
# 1  
Old 12-28-2007
PHP To find pid from port number

Hi,

I am working on HP-UX Release 11i.

I want to find the process id (PID) of the process running on a particular port.

lsof command fuser does not work on this system.

Please suggest some alternative.

Thanks
# 2  
Old 12-28-2007
lsof and fuser are two different commands. I have used them both on 11i. lsof can do want you want and it is what I would use.
# 3  
Old 12-31-2007
lsof not working

Hi,
Thanks for reply.
I tried lsof but it says "lsof: not found"

Plz suggest some alternative..
# 4  
Old 12-31-2007
lsof doesn't come with the os. You need to install it.
link: lsof-4.78
# 5  
Old 12-31-2007
you got to install it then. have you tried fuser? I doubt your version of netstat is able to show PID linked to a port number, but you may want to check your netstat man page anyway.
# 6  
Old 12-31-2007
Yup, netstat has -b option for this purpose but does not work on this machine.

fuser asks for a file name and I don't know how to use it for this purpose.
Is there any other way I can get it without installing any command i.e. with existing commands on Version 11i
# 7  
Old 12-31-2007
The HP-UX netstat man page has no mention of a -b option. I don't know of any standard HP-UX program that can do this.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

2. UNIX for Advanced & Expert Users

Find PID using a Port?

Hi, I do not have root user credentials nor do I have the functional id of the process that uses port 80. How can I find the pid of the process using the port number 80 ? Operating System: Linux (6 Replies)
Discussion started by: mohtashims
6 Replies

3. HP-UX

Find port for Pid

Hi, Is this the most appropriate way of finding the listen port number given the pid is "16659" ? lsof -Pan -i tcp -i udp | grep 16659 | grep -i "listen"If so, how can I extract "7001" and assign it to a variable say myport=7001 from the below output which happens to be actual port number? ... (1 Reply)
Discussion started by: mohtashims
1 Replies

4. UNIX for Dummies Questions & Answers

Find PID for a port

Hi, I need to find the PID for a given port on the below system. HP-UX mymachine B.11.31 U ia64 3223107173 unlimited-user license How can I ? (4 Replies)
Discussion started by: mohtashims
4 Replies

5. Shell Programming and Scripting

Find port number being used by a given process id

Unix gurus, I have a requirement wherein I want to find the port number for a given process id. Is it possible? If so how? TIA, Regards, Praveen (3 Replies)
Discussion started by: sunpraveen
3 Replies

6. UNIX for Dummies Questions & Answers

pid from port number in AIX

Hello guys, How to shut down a port number in AIX. May be first I need to find out what is the process ID of that process that listens to this particular port.. Is there any command to find a process ID from the port number other than "lsof". thanks (1 Reply)
Discussion started by: solaix14
1 Replies

7. UNIX for Dummies Questions & Answers

Find what process on port number

Hi, I am on a Sun Solaris and I want to find out which process is allocated on a certain port. How can I do that? BR Andreas (4 Replies)
Discussion started by: mr_andrew
4 Replies

8. UNIX for Advanced & Expert Users

find out unix port number

Please could some advise me the command to find out the unix port number. regards venhart (4 Replies)
Discussion started by: venhart
4 Replies

9. UNIX for Dummies Questions & Answers

How to find the port number of the oracle process

Hi Unix Gurus, Can we find out the port number used by the oracle process is running.I tried to search the forum but coudnt find. Can anyone help me out with the command (2 Replies)
Discussion started by: thana
2 Replies
Login or Register to Ask a Question