Getting X-Series Uptime Information from SNMP

book

Article ID: 168008

calendar_today

Updated On:

Products

XOS

Issue/Introduction

How to get X-Series chassis uptime information using SNMP.
N/A

Cause

This article describes how to use SNMP to obtain chassis uptime information. Other methods to get the data are also described.


Resolution

To use SNMP to get the amount of time since the X-Series chassis was last initialized, use the HOST-RESOURCES-MIB (host -> hrSystem -> hrSystemUptime). The OID is .1.3.6.1.2.1.25.1.1.0.

Example:

# snmpget -v 1 -c public 172.16.1.1 .1.3.6.1.2.1.25.1.1.0

The uptime value can also be accessed from Linux by using either of the following commands:

# uptime

# cat /proc/uptime

Note:
Do not confuse this MIB with the sysUpTime MIB from RFC1213 (RFC1213 -> system -> sysUpTime), OID .1.3.6.1.2.1.1.3.0. This MIB refers to the time since the network management portion of the system was re-initialized. It indicates when the SNMPagent was started, not when the system itself last booted.

Example:

# snmpget -v 1 -c public 172.16.1.1 .1.3.6.1.2.1.1.3.0

This is a Linux standard.

Workaround

N/A