Get list of running network processes


 
Thread Tools Search this Thread
Operating Systems Solaris Get list of running network processes
# 1  
Old 03-14-2014
Get list of running network processes

Hello All

I am trying to get a list of process or applications runninging on the network only. I should emphasize that im not interested in the application or process if its not using the network.

I tried the good old netstat comand, but im not able to figure out how to list the running processes or application local to the server.


Any one have any ideas?
# 2  
Old 03-14-2014
Well you can try to look at netstat to see what ports are active… then see in /et/services to see who they are...
# 3  
Old 03-14-2014
This should work (requires root privilege of similar).

Code:
find /proc/*/fd -type s | nawk -F / '{print $3}' | sort -nu

# 4  
Old 03-14-2014
If you can get the lsof utility installed it's a great choice.

Code:
lsof -i                # everybody using the network
lsof -i :80            # everybody using port 80
lsof -i 192.168.33.44  # everybody using that address

# 5  
Old 03-17-2014
Quote:
Originally Posted by jlliagre
This should work (requires root privilege of similar).

Code:
find /proc/*/fd -type s | nawk -F / '{print $3}' | sort -nu

Hi does this mini script pull process ids of things running on the network only? im tempted to go with this. Let me know.
# 6  
Old 03-17-2014
Quote:
Originally Posted by busi386
Hi does this mini script pull process ids of things running on the network only? im tempted to go with this. Let me know.
That depends on how you define "running on the network only".
This script will display the PIDs of all processes having an open socket. That will rule out processes not having any network connection but will display services listening to a port even while no connection is currectly open.
# 7  
Old 03-18-2014
Quote:
Originally Posted by jlliagre
That depends on how you define "running on the network only".
This script will display the PIDs of all processes having an open socket. That will rule out processes not having any network connection but will display services listening to a port even while no connection is currectly open.

Hi, thats what I wanted to hear. I am a bit curious to know which part of the code refers to open sockets?

Here is what I am going to run with:

Code:
for pnum in `find /proc/*/fd -type s | nawk -F / '{print $3}' | sort -nu`
 do ps -Ao "pid,user,args" | grep $pnum 
done

This will give me a detailed output.

Hey thanks for all your help. How do I mark this post as resolved?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Many processes running at the same time

Hello everybody , I launched cron to execute a task every hour but the job takes more than hour that's why I'm getting more than 1000 cron processes running at the same time !!! My question is how to tell cron not to execute unless the job terminated in order to have only one process running .... (14 Replies)
Discussion started by: beautymind
14 Replies

2. UNIX for Dummies Questions & Answers

List processes that are running on other hosts

Hi: How to list processes from all hosts, as opposed to the one you are working at? "ps ux" appears to list processes of the user on a single host only. Thanks. N.B Phil (5 Replies)
Discussion started by: phil518
5 Replies

3. Linux

Running processes

Hi guys is it normal to have 5-10 cron/syslog processes running... in my case i got 10 cron process running. (4 Replies)
Discussion started by: batas
4 Replies

4. Solaris

Running processes on GZ/LZ

Hi guys just a question is it normal to see running process on a non-global zone in the global zone... processes such as cron. (3 Replies)
Discussion started by: batas
3 Replies

5. Solaris

No network cable But Network interface is UP and Running

I've one Netra 240 After changing main board and system configuration card reader, Network is not accessible any more, Network interfaces are always UP and Running even when there is no cable connected to Network interfaces. I tried to restart and plumb/unplumb with no luck. ifconfig -a... (7 Replies)
Discussion started by: samer.odeh
7 Replies

6. UNIX for Dummies Questions & Answers

What are these different tty processes(tty1,tty2..) running as root mentioned n the list below.

Hi, I need your help to understand about different processes(tty1,tty2,tty3...) running as root as shown below .What exactly these processes do? root@bisu-desktop:~# ps -eaf | grep -e tty -e UID UID PID PPID C STIME TTY TIME CMD root 761 1 0 10:30 tty5 ... (4 Replies)
Discussion started by: crazybisu
4 Replies

7. Shell Programming and Scripting

how to know the running processes.

Hi can anybody help me regarding this.. i want know the output of ps -ef with explanation. how can we know the running processess. this is the output of ps -elf F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 19 T root 0 0 0 0 SY ... (1 Reply)
Discussion started by: rajesh_pola
1 Replies

8. Shell Programming and Scripting

Need help with running processes script

I'm doing a script with the Shell. I need that it only show the number of running processes. Ex: echo "There are `command` running processes" Thnx! Pd: Sorry the idiom. I'm spanish. (2 Replies)
Discussion started by: Ikebana
2 Replies

9. UNIX for Dummies Questions & Answers

identifying running processes

how to identify the processes running by giving the parent process id (1 Reply)
Discussion started by: trichyselva
1 Replies

10. UNIX for Dummies Questions & Answers

how to find all processes that are running

Hi i've been googling a lot but can't find an answer. All I would like to know is how to find out all processes that are running on a machine. I know ps gives all YOUR processes. thanks (9 Replies)
Discussion started by: speedieB
9 Replies
Login or Register to Ask a Question