LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Real time network checking on application ? (https://www.linuxquestions.org/questions/linux-software-2/real-time-network-checking-on-application-802577/)

Kraiser10 04-17-2010 02:20 PM

Real time network checking on application ?
 
I want to monitor an application lets say that it will be apache2 to see how many in real-time it takes network resources such as upload/download per second how can i do that in linux (cmd not gui) ?
I know it's possible because i can see this in windows in my nod32 firewall monitoring.
Any software which do that on linux ?

smoker 04-18-2010 07:53 AM

to monitor http traffic in real time you can use iftop

Code:

iftop -nP -f "port http"
-n means don't look up hostnames
-P means show the port used for connections
-f means use a filter
"port http" means filter on the port called http

It gives an average of 2 seconds, 10 seconds and 40 seconds for each connection plus a running total.

man iftop

Kraiser10 04-18-2010 09:09 AM

What if i don't want to monitor apache2 but some other application which runs for example on 7654 port?

smoker 04-18-2010 09:36 AM

Well I would guess that you would use 7654 instead of http.
Standard ports can be listed by name, otherwise be specific.
Code:

iftop -nP -f "port http"
is identical to
Code:

iftop -nP -f "port 80"

If you just use iftop -nP if the port has a name it will appear in the listing.


All times are GMT -5. The time now is 02:51 AM.