Traffic an einem bestimmtem Port messen

Backup, Restore und Transfer von Daten
Post Reply
root-noob
Posts: 2
Joined: 2013-09-10 11:07
 

Traffic an einem bestimmtem Port messen

Post by root-noob »

Hallo,

ich möchte an einem bestimmten Port den Datentransfer messen und danach möchte ich wissen wie viel MB verbraucht wurden.
Mit

Code: Select all

tcpdump -i eth0 port 80
habe ich schon probiert. tcpdump kann dies ja in einen Log schreiben, ist es möglich diesen Log auszuwerten damit am Ende nur eine Gesamtzahl heraus kommt. Oder wie könnte ich es noch messen?
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Traffic an einem bestimmtem Port messen

Post by Joe User »

Eventuell reicht Dir ja schon http://serverfault.com/questions/195894
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
root-noob
Posts: 2
Joined: 2013-09-10 11:07
 

Re: Traffic an einem bestimmtem Port messen

Post by root-noob »

Danke! Ich werde es mit iptables versuchen:

Code: Select all

iptables -N rein
iptables -N raus
iptables -A INPUT -p tcp --dport 80 -j rein
iptables -A OUTPUT -p tcp --sport 80 -j raus
und dann mit:

Code: Select all

iptables -vxnL
Die Ausgabe betrachten. Und mit

Code: Select all

iptables -Z
Zähler auf 0 stellen.
Last edited by root-noob on 2013-09-11 00:37, edited 4 times in total.
Post Reply