Title: RE: Reset interface statistics

Send the original post to this list:

[EMAIL PROTECTED]
They may be able to be of more help, perhaps there is some ioctl() you could call to reset it, if so, they would know!

*note: I think they only allow plain text, anything else won't go through.


-----Original Message-----
From: Linux [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 08, 2002 9:00 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Reset interface statistics


Thanks for your reply much appreciated
 
No I have never had this working, but I need to get it working.
I am not bent on messing with values in /proc/net/dev but thought there must be a way to reset the Ethernet stats periodically.

I had not considered writhing a program as suggested but may do. The numbers will eventually grow large and roll over themselves.

I use them to run MRTG to show the cumulative traffic and traffic rate for Internet traffic. It would be real good to be able to reset the

counters every billing period to keep tabs on the bill. Our ADSL bill make my eyes water every month. I think our Telco only needs

us to survive.
 
Thanks for your help
 
Mike
-----Original Message-----
From: Brad Bonkoski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 9 January 2002 10:25
To: '[EMAIL PROTECTED]'
Subject: RE: Reset interface statistics


Your message makes it sound like you did this before and NOW it is not working.  Is this correct?
I don't see how you could.  The only way you could clear out the proc table is for the kernel to loose knowledge of the device.  You as a user/administrator has no ability to mess with those values.  So, short of a reboot, the only way I can think of is to build your Ethernet devices as modules and bring them down, unload the modules and re-load the modules...that should zero it out...

Wouldn't it be easier to write a program that reads this once every now and then and calculates the deltas for you??
-Brad
> -----Original Message-----
> From: Robert Dege [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 08, 2002 1:53 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Reset interface statistics
>
>
>
> Since the value is in /proc, I don't know if you can "zero it
> out" since
> the kernel writes data to that file.  What you can probably do (which
> might be easier), is to write a script.  Either that, or just reboot
> your machine at the beginning of each billing cycle.  I
> figure a reboot
> would zero out the values ;)
>
> Wow, a reboot to solve a problem.... I feel dirty.
>
> -Rob
>
> > Hi
> >
> > I have a Redhat 7.1 box which I am reading the Interface
> statistics from
> > /proc/net/dev.
> > I need to reset the Interface statistics periodically as
> the I collect the
> > Internet
> > interface traffic throughput so I can keep tabs on my ISP billing.
> > This has been a successful measure
> > of total internet traffic for the month.
> >
> > I have tried service network restart / stop / start and
> > stopping and restarting the NICs eth0 and eth1 without success
> >
> > Many thanks
> >
> > Mike
> >
> >
> > This mail was processed by Mail essentials for Exchange/SMTP,
> > the email security & management gateway. Mail essentials adds
> > content checking, email encryption, anti spam, anti virus,
> > attachment compression, personalised auto responders, archiving
> > and more to your Microsoft Exchange Server or SMTP mail server.
> > For more information visit http://www.mailessentials.com
> >
> >
> >
> > _______________________________________________
> > Redhat-list mailing list
> > [EMAIL PROTECTED]
> > https://listman.redhat.com/mailman/listinfo/redhat-list
> >
> --
>
> -Rob
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
This mail was processed by Mail essentials for Exchange/SMTP, the email security & management gateway. Mail essentials adds content checking, email encryption, anti spam, anti virus, attachment compression, personalised auto responders, archiving and more to your Microsoft Exchange Server or SMTP mail server. For more information visit http://www.mailessentials.com

Reply via email to