Networking

Monitor Cisco routers and switches using the IOS environment command

How do you know if your remote router and switches are being cooled properly? Are the fans working? David Davis tells you how to see the environmental status of your Cisco routers and switches and how to be alerted when there is a hardware problem.

How do you know if your remote router and switches are being cooled properly? Are the fans working? David Davis tells you how to see the environmental status of your Cisco routers and switches and how to be alerted when there is a hardware problem.

-----------------------------------------------------------------------------------------------------

What is the Show Environment command?

The Show Environment command can be very helpful to alert you of potential hardware issues. You will need to accesss this command in global Exec mode. Here are the options available for the Show Environment command:

show environment [alarms | all | fans | hardware | last | leds | power-supply | table | temperature | voltages]

David DavisAs you can see, this command has a number of options. You can view the status of your router fans, power supply, system board temperature, and more. I should also point out that the options for this command vary based on the hardware that it is running on.

Have you ever entered a computer room and the temperature was so hot that it felt like an oven? Well, with one swift command you can display temperature and fan status and internal temperatures of your routers.

Let's look at three examples of the Show Environment command and how it displays information based on different routers and switches.

Display from a 3845 router:
Router# show environment

 SYS PS1 is present.
        Fan status: Normal
        Input Voltage status: Normal
        DC Output Voltage status: Normal
        Type: AC
        Thermal status: Normal

 SYS PS2 is present.
        Fan status: Normal
        Input Voltage status: Normal
        DC Output Voltage status: Normal
        Type: AC
        Thermal status: Normal

 AUX(-48V) PS1 is absent.

 AUX(-48V) PS2 is absent.

 Fan  1 Normal
 Fan  2 Normal
 Fan  3 Normal

 Fan Speed is Normal

 Alert settings:
 Intake temperature warning: Enabled, Threshold: 55
 Core temperature warning: Enabled, Threshold: 70 (CPU: 90)

 Board Temperature: Normal
 Internal-ambient temperature = 35, Normal
 CPU temperature = 46, Normal
 Intake temperature = 27, Normal
 Backplane temperature = 24, Normal

 Voltage 1(3300) is Normal, Current voltage = 3300 mV
 Voltage 2(5150) is Normal, Current voltage = 5153 mV
 Voltage 3(2500) is Normal, Current voltage = 2501 mV
 Voltage 4(1200) is Normal, Current voltage = 1203 mV

 Nominal frequency

Router#

Display from a 2960 Switch
switch# show environment ?
  all          Show all environment status
  fan          Show fan status
  power        Show power supply status
  rps          Show RPS status
  temperature  Show temperature status

switch# show environment all
FAN is OK
TEMPERATURE is OK
POWER is OK
RPS is NOT PRESENT

switch#

Also, as you can see, the functionality of the Show Environment command varies from one hardware platform to another. For example, on the 3845 series, there are additional features, such as the multiple temperature sources and alert thresholds, that can be configured.

To read more about Show Environment, please see the Cisco IOS Show Environment Command Reference.

What can I do to be alerted if there is an environmental problem?

With SNMP in the Cisco IOS, you can be alerted to the environmental conditions that your router is able to monitor. By enabling SNMP on the router, it can send traps to an SNMP management station that alerts you when environmental thresholds are exceeded. To do this, use the envmon SNMP notification type, like this:

snmp-server host 10.1.1.1 public envmon
snmp-server enable traps envmon

With this code, a trap would be sent to your SNMP management station for environmental alerts such as fan failure, temperature thresholds warnings, voltage notifications, or redundant power supply failures.

For additional information on Cisco IOS SNMP traps, please see the Cisco IOS SNMP Traps Supported and How to Configure Them documentation. Conclusion

The Show Environment command provides detailed information about your router's or switch's fan, power, and temperature. You can use SNMP in the Cisco IOS to send environmental traps to a network monitoring station. With proper monitoring, you can be sure to be alerted to any environmental issues affecting network equipment and prevent network outages before they occur.

David Davis has worked in the IT industry for 15+ years and holds several certifications, including CCIE, CCNA, CCNP, MCSE, CISSP, VCP. He has authored hundreds of articles and numerous IT training videos. Today, David is the Director of Infrastructure at Train Signal.com. Train Signal, Inc. is the global leader in video training for IT Professionals and end users.

Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!

9 comments
devendra.pareek
devendra.pareek

What is the environmental conditions required for cisco devices.?

me.meagain
me.meagain

how to setup SNMP management station ?

me.meagain
me.meagain

I have a good number of rtr and sw. on my network , I would like to set up a ntwk mangement station that will monitor the fan and other hardware failure. I know that "show environment" will give me that info . but I do not want to go the each device and enter the command , I would like the info to be sent to the management station each day ..that is by using SNMP .. is that possible..? or is there other way to get this info like runing a script or something.. Thanks for ur hlp

johnny.xie
johnny.xie

Rancid is a good tools to get all information about your routers and switches. You can do backup and restore configuration even.

Photogenic Memory
Photogenic Memory

I'm thinking of purchasing a router off of ebay and commands like this will allow me to verify the hardware is functioning well. Thanks so much for posting.

BALTHOR
BALTHOR

I suppose that this is normal.

bowenw
bowenw

Balthor, Like any electronic device the Cisco router uses various D.C. outputs from the power supply to run various parts of the unit. The power input is just a source - it is the various outputs of the power supply that are important, therefore it makes perfect sense to monitor the power supply from the standpoint of what the device's circuitry is actually using. Also, many Cisco products have interchangeable power supplies that use other than 120 V AC as the input (220 V AC, 48 V DC, etc.) but the outputs of the power supply for a specific model device will remain the same regardless of the input source power voltage, polarity or type. Note from the command listing in the article that the device does monitor the input supply in a general sense.

Editor's Picks