Collecting Router Operational Information with SNMP
Problem
You want the NMS server to check and record operational information about the router.
Solution
Look at the contents of the jnxOperatingTable table in the chassis MIB:
aviva@router1> show snmp mib walk jnxOperatingTable … jnxOperatingDescr.1.1.0.0 = backplane jnxOperatingDescr.2.1.0.0 = Power Supply A jnxOperatingDescr.4.1.0.0 = Front Upper Fan jnxOperatingDescr.4.2.0.0 = Front Middle Fan jnxOperatingDescr.4.3.0.0 = Front Bottom Fan jnxOperatingDescr.4.4.0.0 = Rear Fan jnxOperatingDescr.6.1.0.0 = SSB 0 Internet Processor IIv1 jnxOperatingDescr.6.2.0.0 = SSB 1 jnxOperatingDescr.7.1.0.0 = FPC: E-FPC @ 0/*/* jnxOperatingDescr.7.2.0.0 = FPC: E-FPC @ 1/*/* jnxOperatingDescr.8.1.1.0 = PIC: 4x F/E, 100 BASE-TX @ 0/0/* jnxOperatingDescr.8.1.2.0 = PIC: 2x CT3-NxDS0 @ 0/1/* jnxOperatingDescr.8.1.3.0 = PIC: 4x CT3 @ 0/2/* jnxOperatingDescr.8.2.1.0 = PIC: 2x OC-3 ATM, MM @ 1/0/* jnxOperatingDescr.9.1.0.0 = Routing Engine 0 jnxOperatingDescr.9.2.0.0 = Routing Engine 1 jnxOperatingDescr.10.1.0.0 = Front Panel Display jnxOperatingTemp.1.1.0.0 = 22 jnxOperatingTemp.2.1.0.0 = 22 jnxOperatingTemp.4.1.0.0 = 0 jnxOperatingTemp.4.2.0.0 = 0 jnxOperatingTemp.4.3.0.0 = 0 jnxOperatingTemp.4.4.0.0 = 0 jnxOperatingTemp.6.1.0.0 = 30 jnxOperatingTemp.6.2.0.0 = 0 jnxOperatingTemp.7.1.0.0 = 28 jnxOperatingTemp.7.2.0.0 = 27 jnxOperatingTemp.8.1.1.0 = 0 jnxOperatingTemp.8.1.2.0 = 0 jnxOperatingTemp.8.1.3.0 = 0 jnxOperatingTemp.8.2.1.0 = 0 jnxOperatingTemp.9.1.0.0 = 29 jnxOperatingTemp.9.2.0.0 = 31 jnxOperatingTemp.10.1.0.0 = 0 …
Discussion
The jnxOperatingTable table in the chassis MIB lists all the components installed in the chassis along with information about their operation state. This table has an absolute OID of .1.3.6.1.4.1.2636.3.1.13.
The abridged output in the recipe shows the router hardware components and the current temperature (in degrees Celsius) for each component. This table contains much more information about the hardware, such as DRAM size (in bytes) for components that have memory:
jnxOperatingDRAMSize.6.1.0.0 = 67108864 jnxOperatingDRAMSize.7.1.0.0 = 33554432 jnxOperatingDRAMSize.7.2.0.0 = 33554432 jnxOperatingDRAMSize.9.1.0.0 = 805306368 jnxOperatingDRAMSize.9.2.0.0 = 805306368
Referring back to the list of hardware components, jnxOperatingDRAMSize.6.1.0.0 is the router's System and Switch Board ( SSB), which handles forwarding for M20 routers. The other items are the FPC0 and FPC1 boards and the two Routing Engines. The output also shows how long a component has been up:
jnxOperatingUpTime.1.1.0.0 = 35718300 jnxOperatingUpTime.2.1.0.0 = 35719533 jnxOperatingUpTime.4.1.0.0 = 35719534 jnxOperatingUpTime.4.2.0.0 = 35719535 jnxOperatingUpTime.4.3.0.0 = 35719536 jnxOperatingUpTime.4.4.0.0 = 35719537 jnxOperatingUpTime.6.1.0.0 = 6515160 jnxOperatingUpTime.6.2.0.0 = 0 jnxOperatingUpTime.7.1.0.0 = 6511883 jnxOperatingUpTime.7.2.0.0 = 6511798 jnxOperatingUpTime.8.1.1.0 = 6509154 jnxOperatingUpTime.8.1.2.0 = 6509150 jnxOperatingUpTime.8.1.3.0 = 6509100 jnxOperatingUpTime.8.2.1.0 = 6508973 jnxOperatingUpTime.9.1.0.0 = 35718300 jnxOperatingUpTime.9.2.0.0 = 1978055600 jnxOperatingUpTime.10.1.0.0 = 35719549
The output shows that RE0 has been up for 35,718,300 10-second intervals, which is about 99 hours, or just over 4 days. You can confirm the Routing Engine information shown in the MIB objects with the following CLI command:
aviva@router1> show chassis routing-engine Routing Engine status: Slot 0: Current state Master Election priority Master (default) Temperature 29 degrees C / 84 degrees F CPU temperature 30 degrees C / 86 degrees F DRAM 768 MB Memory utilization 36 percent CPU utilization: User 0 percent Background 0 percent Kernel 1 percent Interrupt 0 percent Idle 99 percent Model RE-2.0 Serial ID 58000007348d9a01 Start time 2005-12-07 13:28:55 PST Uptime 4 days, 3 hours, 57 minutes, 35 seconds Load averages: 1 minute 5 minute 15 minute 0.07 0.05 0.02