Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to trace a possible link problem on one of our servers' ethernet interfaces. ifconfig reports a large number of error packets. I've asked the hosting company to make some changes to the setup and would like to reset the interface counters to get a better idea if the situation has improved.

Restarting the machine is the obvious answer, but as this machine is the primary NAS, a maintenance window will be hard to acquire. Is it possible to reset the counters without a restart of the machine ?

Operating system is RedHat EL4, 32bit.

share|improve this question

4 Answers 4

up vote 6 down vote accepted

This question has been answered on SF already.

In short, the only way on a Linux box (at present) is to reload the network driver module, which may or may not be possible with your kernel configuration.

share|improve this answer

Let me add a remark why resetting network counters is a bad idea: It only works with a single reader.

A single reader knows that it has reset the counter and is able to deal with it. But if there are many different readers (e.g. monitoring plugins, snmp agents, etc) only the one that resets knows about it. All others will only see a sudden jump of the counter. That's bad.

Therefore, it's a good idea to offer a differential mode in programs which display these numbers. I.e. display the difference between the last counter reading and the current reading instead of displaying the absolute value of the current reading. Using this technique there often is no need to reset the counter.

share|improve this answer

It sounds like you can't.

You could just restart the network service and reload the driver. This would not be a full reboot. But you would still need a maintenance window, and a console/kvm session so you could reload the service.

share|improve this answer

Am I missing something?

Isn't resetting the counters is just a cosmetic convenience in the situation you describe?

Say your tx errors are 100001 at the time the network change is made, then you simply treat 100001 as 0. I.e. if 30 minutes later there are 100030 tx errors shown, you know you've had 29 additional errors. I don't really see the advantage of resetting the counters, unless you anticipate they are going to overflow - even then it still just a convenience.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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