How do i list running process with the ports they are using?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How do i list running process with the ports they are using?
# 1  
Old 03-26-2012
How do i list running process with the ports they are using?

How do i list the running process and also view the ports they are listening to at the same time?
# 2  
Old 03-26-2012
On Linux
Code:
netstat -anp

This User Gave Thanks to bartus11 For This Post:
# 3  
Old 03-26-2012
lsof is the best tool for this job as it can link a running process to the port it is holding open...you can always install it on your system if it isnt there.
# 4  
Old 03-26-2012
Thanks guys. shamrock, i will lookup the syntax for lsof and see what i can do with that.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

List Process running under current user

Hi, i need to list the processes running only under current logged in user. EX: $ whoami oraaqw $ ps -ef | grep tnslsnr oraaqw 11403300 19267592 0 09:14:47 pts/3 0:00 grep tnslsnr oraaqw 15794208 1 0 Jan 14 - 11:59... (6 Replies)
Discussion started by: aravindadla
6 Replies

2. UNIX for Advanced & Expert Users

Finding process that turned on ports

I have 2 identical solaris 10 servers that are simply apache servers, running a version of apache I installed. # uname -a SunOS wilber 5.10 Generic_147440-25 sun4u sparc SUNW,Sun-Fire-V245 I did a netstat on one of the servers and see 2 ports that are on. These are only on on one of the... (2 Replies)
Discussion started by: csross
2 Replies

3. Shell Programming and Scripting

RSH: Running out of ports

I have an issue where I am running out of ports when using RSH to start a script remotely. I have a script that i need to run that has been pushed out to every server. I have a list of servers (hostfilelist) Basically, I have a simple loop that will run them in paralell. for host in `cat... (1 Reply)
Discussion started by: nitrobass24
1 Replies

4. AIX

How to list all threads in a running process

Hello, On Linux, I can use 'ps -efL | grep process_name' to list all threads that belong to a running process. -L has a different meaning on AIX and I could not find an equivalent flag in the man pages. Does anyone know of a way to dump the threads under a running process? Thanks,... (2 Replies)
Discussion started by: makodarear
2 Replies

5. Shell Programming and Scripting

Finding the process id of the process using the ports

Hi Any idea how to get the process id of the process using the ports lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC. Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies

6. Red Hat

No process ID for listening ports

How can I have ports that are listening without processes being associated with them? root@ldv002 # netstat -ltnup Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0... (2 Replies)
Discussion started by: Padow
2 Replies

7. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

8. Solaris

List TCP ports with process

Hello, One of our developers is asking for a command/script in Solaris similar to "netstat -anp" in Linux. He gave this output as an example: root@xxx:~# netstat -anp | grep LISTEN tcp 0 0 0.0.0.0:7937 0.0.0.0:* LISTEN 16082/nsrexecd tcp 0 ... (7 Replies)
Discussion started by: vimes
7 Replies

9. UNIX for Dummies Questions & Answers

unix process that frees ports

Hello, I know that there is a unix system process that checks periodically the ports and if it finds any zombies then it frees them (the period is set by a kernel parameter). Can anyone tell me the name of the process and the kernel parameter ? Thanks :) (2 Replies)
Discussion started by: FunnyCats
2 Replies

10. Shell Programming and Scripting

how to get the list of process running in the server from the local machin n unix ?

how to get the list of process running in the server from the local machin n unix ? (3 Replies)
Discussion started by: guhas
3 Replies
Login or Register to Ask a Question