interface up time command

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

Thanks
dsancAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BBRazzCommented:
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.
0
decoleurCommented:
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 131.108.28.8, subnet mask is 255.255.255.0
  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
---More---


hope this helps:

-t
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
akalbfellCommented:
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.

0
blazekingCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Routers

From novice to tech pro — start learning today.