Skip to contentSkip to conversation

Reset Statistics?

LARTC Sven Anders 3 participants 3 messages Nov 10, 2004 – Nov 13, 2004

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is it possible to reset the statistics (ip -s link) ??

If not, why. Maybe there is a trick?

Regards
~ Sven

- --
~ Sven Anders <[email protected]>

~ ANDURAS service solutions AG
~ Innstraße 71 - 94036 Passau - Germany
~ Web: www.anduras.de - Tel: +49 (0)851-4 90 50-0 - Fax: +49 (0)851-4 90 50-55

Rechtsform: Aktiengesellschaft - Sitz: Passau - Amtsgericht Passau HRB 6032 Mitglieder des Vorstands: Sven Anders, Marcus Junker, Michael Schön Vorsitzender des Aufsichtsrats: Dipl. Kfm. Karlheinz Antesberger -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBkkt/5lKZ7Feg4EcRAkSQAJ9aGpZ1K+w7S0oJvLRnUoCqWRimgwCgmV4g nHK5DbCwfgk+qqn8vA0l8dk=
=spAQ
-----END PGP SIGNATURE-----

begin:vcard
fn:Sven Anders
n:Anders;Sven
org:ANDURAS AG;Research and Development adr;quoted-printable:;;Innstra=C3=9Fe 71;Passau;Bavaria;94036;Germany email;internet:[email protected]
title:Dipl. Inf.
tel;work:++49 (0)851 / 490 50 - 0
tel;fax:+49 (0)851 / 4 90 50 - 55
x-mozilla-html:FALSE
url:http://www.anduras.de
version:2.1
end:vcard

#1 lore raw

Dnia ¶roda, 10 listopada 2004 18:10, Sven Anders napisa³:

Quoted 3 lines

Is it possible to reset the statistics (ip -s link) ??

If not, why. Maybe there is a trick?

Try to restart your tc config?

Signature · 6 lines
.: Jakub G³azik (zytek)
.: email: [email protected]
.: JID: [email protected]
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Sven Anders

* Sven Anders <[email protected]> 2004-11-10 18:10

Quoted 3 lines

Is it possible to reset the statistics (ip -s link) ??

If not, why. Maybe there is a trick?

The statistics are stored in the driver but you can write a kernel module calling get_stats for each netdevice and set them to 0.

struct net_device *dev;

rtnl_lock();
read_lock(&dev_base_lock);
for (dev = dev_base; dev; dev = dev->next) {
struct net_device_stats *s = dev->get_stats(); memset(s, 0, sizeof(*s));
}
read_unlock(&dev_base_lock);
rtnl_unlock();

Both, dev_base and dev_base_lock are exported symbols.
Not tested but might work.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/