• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 14388
  • Last Modified:

interface up time command

I am looking for a command that tells me how long an interfaces (Gigabit) has been up or down.

1 Solution
Best way I can think of is to filter the log.

sh log | inc GigabitEthernet0/1

Simple maths should then show the time its been up or down.
for Cisco it doesn't matter if it is GigE or FastE the commands are the same. unless you are using external logging the best you will be able to do is get info on the last state change. sho interface ge0/1 will show you the time from the last input or output. i.e.

Router# show interfaces
Ethernet 0 is up, line protocol is up
  Hardware is MCI Ethernet, address is 0000.0c00.750c (bia 0000.0c00.750c)
  Internet address is, subnet mask is
  MTU 1500 bytes, BW 10000 Kbit, DLY 100000 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive set (10 sec)
  ARP type: ARPA, ARP Timeout 4:00:00
  Last input 0:00:00, output 0:00:00, output hang never
  Last clearing of "show interface" counters 0:00:00
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  Five minute input rate 0 bits/sec, 0 packets/sec
  Five minute output rate 2000 bits/sec, 4 packets/sec
     1127576 packets input, 447251251 bytes, 0 no buffer
     Received 354125 broadcasts, 0 runts, 0 giants, 57186* throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     5332142 packets output, 496316039 bytes, 0 underruns
     0 output errors, 432 collisions, 0 interface resets, 0 restarts

hope this helps:

no there is no command for that.
to get this information you have to use SNMP and a monitoring solution, we use Whats up Gold for this kind of monitoring although there are plenty of choices and many open source ones.

I've had this same problem for years.  Unless you've logged the up/down warning in some kind of syslog or SNMP program, you can't find the uptime for a single interface.  However, if you use a point-to-point protocol (PPP) to establish your connection on the interface - AND you bond (or bundle) interfaces, you can run "show ppp multilink" to get that information:

core_router#sh ppp multilink

Multilink3, bundle name is test_bundle
  Bundle up for 11w0d
  3 lost fragments, 4254925 reordered, 0 unassigned
  3 discarded, 2 lost received, 25/255 load
  0xD75D60 received sequence, 0x7A9F73 sent sequence
  Member links: 3 active, 0 inactive (max not set, min not set)
    Serial2/0/8:8, since 11w0d, last rcvd seq D75D5D
    Serial2/0/9:9, since 11w0d, last rcvd seq D75D5E
    Serial2/0/10:10, since 11w0d, last rcvd seq D75D5F

Anyone know any other "tricks" to get this kind of information?  I just stumbled on this one.  It helps us often, as we have several remote sites with multiple bonded T1's.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now