Uptime over snmp wrong

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
comfone
Posts: 127
Joined: Fri May 01, 2015 3:28 am

Uptime over snmp wrong

Post by comfone »

Hi All

I would like to check when the server has been booted the last time or how log it is already running.

But I get three different values?!? (see below=

When is use the OID 1.3.6.1.2.1.1.3.0 i get 88 days.
When is use the OID .1.3.6.1.2.1.25.1.1.0 I get 18 days but
when I run uptime on the Server I get 515 days!

# uptime
17:38pm up 515 days 4:29, 1 user, load average: 0.00, 0.01, 0.05

# snmpget -v2c -cxxxxx hostname .1.3.6.1.2.1.25.1.1.0
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (156257837) 18 days, 2:02:58.37

snmpget -v2c -cxxxxx hostname 1.3.6.1.2.1.1.3.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (767329167) 88 days, 19:28:11.67


I would prefer to use snmp to check this value. Which value is the correct one?

Can you help?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Uptime over snmp wrong

Post by hsmith »

Can you give us some information about the device?
Former Nagios Employee.
me.
comfone
Posts: 127
Joined: Fri May 01, 2015 3:28 am

Re: Uptime over snmp wrong

Post by comfone »

It's a Linux VM
cat /proc/version
Linux version 3.11.10-25-default (geeko@buildhost) (gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux) ) #1 SMP Wed Dec 17 17:57:03 UTC 2014 (8210f77)
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Uptime over snmp wrong

Post by Box293 »

Uptime is how long the system has been running since boot. Sometimes this is the operating system, other devices might use the SNMP engine uptime.

hrSystemUptime OBJECT-TYPE
SYNTAX TimeTicks
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The amount of time since this host was last
initialized. Note that this is different from
sysUpTime in the SNMPv2-MIB [RFC1907] because
sysUpTime is the uptime of the network management
portion of the system."
::= { hrSystem 1 }

sysUpTime OBJECT-TYPE
SYNTAX TimeTicks
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The time (in hundredths of a second) since the
network management portion of the system was last
re-initialized."
::= { system 3 }

hrSystemUptime is the correct one to be using, but why is it only 18 days when it's really 515 days AND the other one is 88 days.

http://fixunix.com/snmp/65375-sysuptime-32-bits.html

The maximum support number is 497.

497 + 18 = 515

So basically you're server has been running longer than the 32bit snmp counter can support.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked