cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1065
Views
5
Helpful
4
Replies

Interface Command?

agent2007
Level 1
Level 1

is there such a command in cisco ios to check how long an interface has been up?

thanks

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

4 Replies 4

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.

Joe Clarke
Cisco Employee
Cisco Employee

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.

thanks. do I need to copy this in to flash?

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: