I am using Ubuntu.

I need to count the number of packet received in a specific interface. I found this can be done using netstat. However, I need to count starting from t=zero until a specific time I want (t=...) and the counter shall be start from zero

This can be done if everytime I restart the computer so the counter starts from zero, but I just want to know if there is any other solution to capture how many packets on a specific interface within a certain time I want.

link|improve this question
Interface stats are available via SNMP. – Zoredache Jan 30 at 18:13
@zoredache : yes, and also in other tools that basically take the stat from /proc/sys.. but i am curious how to make the packet counter to 0, without having to restart the machine all the time – heike Jan 30 at 18:37
@Zoredache : lol linkception :D thank you (unfortunately you post in comment, not the answer. I can not accept the answer) – heike Jan 30 at 19:12
If that question does have the answers you need, then I'll vote to close this question as a duplicate of that. – Zoredache Jan 30 at 19:36
feedback

1 Answer

up vote 0 down vote accepted

I am afraid there is no way to reset counters without restarting ( or unload-load cycle nic card module if nic is loaded via dynamic module.)

Virtual zero-ing concept is discussed here though.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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