Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

take uptime of the switch

hi,

This is not a very technical issue but if anyone can help/ suggess me its realy helpful for us.

In our environment we have 24 cisco switches and everyday we need to login into each switch to check the uptime of the switch, that is very time consuming process.

Please help us by suggesting some shortcut to achive the desired result.

Thanks

Shashi

3 REPLIES
Cisco Employee

Re: take uptime of the switch

Hi Shashi

The easiest way is to poll the switch using SNMP and get the uptime.

Configuration on CISCO.

snmp-server community cisco RO

From SNMP Server:

snmpwalk -Os -c cisco -v 1 sysUpTimeInstance

kmuruga2% snmpwalk -Os -c cisco -v 1 10.105.137.5 sysUpTimeInstance
sysUpTimeInstance = Timeticks: (6208631) 17:14:46.31

From the switch:

ME3400 uptime is 17 hours, 19 minutes
System returned to ROM by power-on
System image file is "flash:me340x-metroipaccessk9-mz.122-53.SE.bin"

Hope it helps!!

Thanks & Regars,

Karthick Murugan

CCIE#39285

Thanks & Regards, Karthick Murugan CCIE#39285
New Member

take uptime of the switch

Hi Karthick,

SNMP string is already configured at cisco switches and it is also communicating to syslog server.

I dont understand where do i put the script

snmpwalk -Os -c cisco -v 1 sysUpTimeInstance

kmuruga2% snmpwalk -Os -c cisco -v 1 10.105.137.5 sysUpTimeInstance
sysUpTimeInstance = Timeticks: (6208631) 17:14:46.31

and where i will get the output of uptime.

Thanks

Shashi

Cisco Employee

take uptime of the switch

Hi Shashi,

You should execute that command from a SNMP server. Basically, a windows/linux machine with snmp walk application installed.

For testing you can use some free SNMP Walk tool.

http://www.snmpsoft.com/freetools/snmpwalk.html

Hope it helps.

Thanks

Karthick Murugan

Thanks & Regards, Karthick Murugan CCIE#39285
184
Views
0
Helpful
3
Replies