All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Reset Statistics?
@ 2004-11-10 17:10 Sven Anders
  2004-11-13 14:23 ` Jakub Głazik
  2004-11-13 15:15 ` Thomas Graf
  0 siblings, 2 replies; 3+ messages in thread
From: Sven Anders @ 2004-11-10 17:10 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

-----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 <anders@anduras.de>

~ 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-----

[-- Attachment #2: anders.vcf --]
[-- Type: text/x-vcard, Size: 339 bytes --]

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:anders@anduras.de
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] Reset Statistics?
  2004-11-10 17:10 [LARTC] Reset Statistics? Sven Anders
@ 2004-11-13 14:23 ` Jakub Głazik
  2004-11-13 15:15 ` Thomas Graf
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Głazik @ 2004-11-13 14:23 UTC (permalink / raw)
  To: lartc

Dnia ¶roda, 10 listopada 2004 18:10, Sven Anders napisa³:
> Is it possible to reset the statistics (ip -s link) ??
>
> If not, why. Maybe there is a trick?

Try to restart your tc config?

-- 
.: Jakub G³azik (zytek)
.: email: zytek@ostrow-wlkp.net
.: JID: zytek@azazel.ostrow-wlkp.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] Reset Statistics?
  2004-11-10 17:10 [LARTC] Reset Statistics? Sven Anders
  2004-11-13 14:23 ` Jakub Głazik
@ 2004-11-13 15:15 ` Thomas Graf
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Graf @ 2004-11-13 15:15 UTC (permalink / raw)
  To: lartc

* Sven Anders <41924B7F.3050202@anduras.de> 2004-11-10 18:10
> 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-13 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-10 17:10 [LARTC] Reset Statistics? Sven Anders
2004-11-13 14:23 ` Jakub Głazik
2004-11-13 15:15 ` Thomas Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.