Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a GUI to track any socket connection sent to this computer and which program that initiates it?

Also if possible track any incoming connection sent to this computer and which program that handles it (as a realtime popup indicator if possible) ?

For example:

"/bin/x owned by user x tries to connect to x.x.x.x:x"
"x.x.x.x connected to your computer on port 80 handled by /usr/bin/apache"

or at minimum, what should I learn to create this kind of software?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

There is old school console tool:

   nethogs - Net top tool grouping bandwidth per process

e.g. run in this manner:

# nethogs eth0

NetHogs version 0.8.0

  PID USER    PROGRAM            DEV        SENT       RECEIVED      
11173 user    rtorrent          eth0     111.001       4.358 KB/sec
13159 user    rtorrent          eth0     125.673       3.734 KB/sec
9737  user    irssi             eth0       0.027       0.1
9687  user    chromium-browser  eth0       0.000       0.000 KB/sec

You can browser the developer's site, for more information and more such tools.

Now you can grab the source, make your own fork and develop kind of GUI. Appending sockets info with fidelity near bandwidth not a great job.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.