06-27-2008 06:00 AM
is there such a command in cisco ios to check how long an interface has been up?
thanks
Solved! Go to Solution.
06-30-2008 08:29 AM
No. This could run from a network server:
tclsh tftp://10.1.1.1/int-uptime.tcl
However, you could copy it to flash if you wanted.
06-28-2008 05:15 AM
hi,
There is no such command. But router uptime can be obtained (sh verion). And Last input / Last output also (sh int f0/0).
Instead I would suggest either you use a Syslog server to log the interface up/down messages or a SNMP tool (OpenNMS), which would be the best option.
06-29-2008 09:40 PM
If your device is running 12.3(7)T or higher (or a 6500 running 12.2(18)SXF5 or higher), you can use this Tcl script to get the uptime for an interface. You can run it like:
Router#tclsh flash:int-uptime.tcl --interface FastEthernet0/0 --community public
Interface FastEthernet0/0 has been in its current state for 4 weeks, 5 days, 8 hours, 34 minutes, 47 seconds (since Tue May 27 16:59:58 EDT 2008)
You can run the script with --help or --usage to get usage help. This tool uses the SNMP object ifLastChange to determine the last time an interface changed state. If the interface is currently up, then the time shown will be the interface uptime.
06-30-2008 02:40 AM
thanks. do I need to copy this in to flash?
06-30-2008 08:29 AM
No. This could run from a network server:
tclsh tftp://10.1.1.1/int-uptime.tcl
However, you could copy it to flash if you wanted.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide