Interface Command?

Answered Question
Jun 27th, 2008

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

thanks

I have this problem too.
0 votes
Correct Answer by Joe Clarke about 8 years 5 months ago

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
dhananjoy chowdhury Sat, 06/28/2008 - 05:15

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 Sun, 06/29/2008 - 21:40

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.

Attachment: 

Actions

This Discussion