Post by mat54I know that it is the uptime of the snmp agent, the pb is when the
uptime is more than 497 days, because when the snmp agent is started
from 500 days, the sysUptime gives me 3 days and that's a big mistake
Let's take a step back.
What exactly is the sysUpTime being used for?
Why does it matter if the value is "wrong" - what will actually break?
The main use of sysUpTime seems to be as a base time for assorted
internal timestamps, to indicate whether various MIB values might
have changed. If the base time changes, then this effectively
invalidates all such time-based caches.
So any external management tools might need to reload all their
current local representation of the state of that particular agent
(and the agent itself might need to reset all the relevant timestamps).
That's certainly less than ideal, but this sort of "blip" once every
16 months is hardly a disaster.
Post by mat54So, i must restart all the server with an uptime > 497 days to have a
correct uptime.
Uptime of the server, or uptime of the SNMP agent?
Post by mat54I'm system administrator, and it could help to plan reboot of server.
That sort of planning feels more related to the uptime of the server,
rather than the agent. If I have a policy of rebooting a given
server every two years (due to a very slow memory leak in the kernel),
it doesn't matter how often the agent is stopped and restarted - I
still need to know how long the server as a whole has been up.
So it would probably be more appropriate to look at hrSystemUptime.
Now in fact, that simply moves the problem since this object is also
defined using the same syntax as sysUpTime, so will be limited to the
same range. (And hrSystemDate doesn't help here either - that's the
time *now*, not the time the system booted). So there is indeed a
problem - but with the hrSystem group, not sysUpTime.
What's probably necessary is a "HC-Counter" style object, monitoring
how often the hrSystemUptime value wraps. Taking these two objects
together should address the problem you mention.
Or else a 'hrBootDate' object, with syntax DateAndTime.
Dave