LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Monitoring traffic on ports.. (https://www.linuxquestions.org/questions/linux-networking-3/monitoring-traffic-on-ports-73302/)

EL3CTRO 07-16-2003 12:51 PM

Monitoring traffic on ports..
 
I was just wondering, is there a command in linux that would show me how many MB's have been transferred to and from a certain port? Preferably on a monthly basis.

hakcenter 07-16-2003 12:56 PM

heh start logging traffic and write a perl script

EL3CTRO 07-16-2003 02:52 PM

Ok, considering that having asked a question like that, it would be a reasonable guess that

1. I have no clue how to log traffic
2. I can't program in perl

Now can someone give me a useful answer?

jstu 07-16-2003 04:18 PM

iptables -L -v will tell you how many packets and the bytes that where transfered. but you have to have a rule in place first. Example of tracking all tcp traffic coming in on port 80.

iptables -A INPUT -i eth0 --dport 80 -j ACCEPT

seabass55 07-16-2003 06:51 PM

you can try iptraf


All times are GMT -5. The time now is 11:20 PM.