- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to reset network interface statistics/counters...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 09:46 AM
тАО04-26-2005 09:46 AM
How to reset network interface statistics/counters?
Hi Linux Gurus,
How can I reset the interface statistics (or interface counters) for a Linux network interface without bringing the system down or editing /proc/net/dev directly? I used to support Tru64 UNIX and the netstat command had -z switch to zero (reset) the interface counters and the -I switch to specify the interface. I don't see this in the Linux netstat command.
Thanks,
Ross
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 09:51 AM
тАО04-26-2005 09:51 AM
Re: How to reset network interface statistics/counters?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 10:01 AM
тАО04-26-2005 10:01 AM
Re: How to reset network interface statistics/counters?
I did check both of these and did not see any switches to solve my problem... but then maybe I missed it. Do you know what the switch is to reset the interface counters?
Thanks,
Ross
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 03:42 PM
тАО04-26-2005 03:42 PM
Re: How to reset network interface statistics/counters?
But please, why do you want to do it? I'm having trouble trying to understand why you'd want to reset the interface counters.
In any case, if you do need some sort of re-settable counter, use IPTables based on an interface.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 05:42 PM
тАО04-26-2005 05:42 PM
Re: How to reset network interface statistics/counters?
Hi,
According to Linux network developers, the network counters are not supposed to be reset. If you really want to this you hack the kernel code to this.
A simple but not so straight forward method is to stop the network interface remove the driver and reload the driver back, this will reset counter values to 0.
Hope this helps,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 11:50 PM
тАО04-26-2005 11:50 PM
Re: How to reset network interface statistics/counters?
> According to Linux network developers, the network counters are not supposed to be reset.
Can you point me to some documentation that states that, please?
Thanks,
Ross
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 12:17 AM
тАО04-27-2005 12:17 AM
Re: How to reset network interface statistics/counters?
http://nylug.org/pipermail/nylug-talk/2005-February/025665.html
you can also accomplish the task by a simple shell program.
if it is for RH then you can get network driver name from /etc/modprobe.conf
Hope this helps,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 12:54 AM
тАО04-27-2005 12:54 AM
Re: How to reset network interface statistics/counters?
a network driver module (ifconfig ethX down; rmmod ethX;insmod ethX;ifconfig ethX).
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 03:14 AM
тАО04-27-2005 03:14 AM
Re: How to reset network interface statistics/counters?
ftp.cup.hp.com/dist/networking/tools/ - you will need to compile the .c file for linux - it is an hp-ux pa-risc binary at the moment. might be good to do a bit of sanity checking on the output as it doesn't have tooooo much linux exposure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 05:57 AM
тАО04-27-2005 05:57 AM
Re: How to reset network interface statistics/counters?
can do stats of many types of network info,
per protocol, per interface, per etc. . . .
om debian you just as root type "apt-get install iptraf" in a terminal window. In others, you resort to other methods, or get the source. here is a link from freshmeat:
http://freshmeat.net/projects/iptraf/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2005 09:44 AM
тАО05-11-2005 09:44 AM
Re: How to reset network interface statistics/counters?
I don;t know if you guys find out the answer for this or not. But here it is or atleast what I've been doing.
service network restart
Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2005 10:13 AM
тАО05-11-2005 10:13 AM
Re: How to reset network interface statistics/counters?
Thanks,
Ross