cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
129947
Views
16
Helpful
14
Replies

Interface Uptime

s.kanth
Level 1
Level 1

Is there any command to find out how long a perticulater interface has been up ? (Example BVI interface on AP, serial interface )

1 Accepted Solution

Accepted Solutions

Thanks for your post..

But my requirement is that, suppose Serial/BVI interface has been up since longtime ...How do i find out the exact uptime.

TIA

Sri

Hi Sri,

I don't think  there is any command for that to get this information any how you need to have SNMP and a monitoring solution,like  Whats up Gold etc.

sho interface ge0/1 will show you the time from the last input or output. i.e. which can be helpful for checking the input traffic and output traffic rate time.

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


Freetechexams#show interfaces s0/0

Serial0/0 is up, line protocol is up

  Hardware is PowerQUICC Serial

  Internet address is 1.1.1.1/8

  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,

  reliability 255/255, txload 1/255, rxload 1/255

  Encapsulation HDLC, loopback not set

  Keepalive set (10 sec)

Last input 00:00:05, output 00:00:02, output hang never

  Last clearing of”show interface” counters never

  Input queue: 0/75/0 (size/max/drops); Total output drops: 0

  Queueing strategy: weighted fair

  Output queue: 0/1000/64/0 (size/max/drops); Total output drops: 0

  Convesations 0/2/256 (active/max active/max total)

  Reserved Conversations 0/0 (allocated/max allocated)

  5 minute input rate 0 bits/sec, 0 packets/sec

  5 minute output rate 0 bits/sec, 0packets/sec

  2104 packets input, 133491 bytes. 0 no buffer

  Received 1280 broadcasts, 0 runts, 0 giants, 0 throttles

  1 input errors, 0 CRC, 1 frame, 0 overrun, 0 ignored, 0 abort

  4678 packets output, 329768 bytes, 0 underruns

  0 output errors, 0 collisions, 7 interface resets

  0 output buffer failures, 0 output buffers swapped out 4 carrier transitions

DCD=up DSR=up DTR=up RTS=up CTS=up

Hope to Help !!

Ganesh.H

View solution in original post

14 Replies 14

Ganesh Hariharan
VIP Alumni
VIP Alumni
Is there any command to find out how long a perticulater interface has
been up ? (Example BVI interface on AP, serial interface )

Hi,

If you turn on logging on the router you should be able to see the times the interface went down. Just make sure that you configure the datetime/uptime for the logging, the whole thing would look like this:

Router(config)#logging buffered

Router(config)#service timestamps log datetime msec localtime --> Logging entries based on the time the router shows with the ´show clock´ command

or

Router(config)#service timestamps log uptime msec localtime --> Logging entries based on the uptime of the router

When you issue the ´show log´ command, you should see entries telling you when the interface went down.

Hope that Helps !!

If helpful do rate the post

Ganesh.H


Thanks for your post..

But my requirement is that, suppose Serial/BVI interface has been up since longtime ...How do i find out the exact uptime.

TIA

Sri

Thanks for your post..

But my requirement is that, suppose Serial/BVI interface has been up since longtime ...How do i find out the exact uptime.

TIA

Sri

Hi Sri,

I don't think  there is any command for that to get this information any how you need to have SNMP and a monitoring solution,like  Whats up Gold etc.

sho interface ge0/1 will show you the time from the last input or output. i.e. which can be helpful for checking the input traffic and output traffic rate time.

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


Freetechexams#show interfaces s0/0

Serial0/0 is up, line protocol is up

  Hardware is PowerQUICC Serial

  Internet address is 1.1.1.1/8

  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,

  reliability 255/255, txload 1/255, rxload 1/255

  Encapsulation HDLC, loopback not set

  Keepalive set (10 sec)

Last input 00:00:05, output 00:00:02, output hang never

  Last clearing of”show interface” counters never

  Input queue: 0/75/0 (size/max/drops); Total output drops: 0

  Queueing strategy: weighted fair

  Output queue: 0/1000/64/0 (size/max/drops); Total output drops: 0

  Convesations 0/2/256 (active/max active/max total)

  Reserved Conversations 0/0 (allocated/max allocated)

  5 minute input rate 0 bits/sec, 0 packets/sec

  5 minute output rate 0 bits/sec, 0packets/sec

  2104 packets input, 133491 bytes. 0 no buffer

  Received 1280 broadcasts, 0 runts, 0 giants, 0 throttles

  1 input errors, 0 CRC, 1 frame, 0 overrun, 0 ignored, 0 abort

  4678 packets output, 329768 bytes, 0 underruns

  0 output errors, 0 collisions, 7 interface resets

  0 output buffer failures, 0 output buffers swapped out 4 carrier transitions

DCD=up DSR=up DTR=up RTS=up CTS=up

Hope to Help !!

Ganesh.H

I appreciate your assistance :-)

That is great and all but we need to know how long the port has been up from looking at the interface. Looking at the last traffic and or log is worthless. 

 

We need this to be a feature. 

That is great and all but we need to know how long the port has been up from looking at the interface. 

Only the 4500-series switch has this unique command:  sh interface link

 

This command has been requested by a lot of people but the dev have flatly refused to incorporate this command.  

 

The only way to generate this kind of output would have to be some creative use of SNMP.

try this commend might the helpful for you. 

show int | i proto.*notconnect|proto.*administratively down|Last in.

We just started using Cisco switch recently and this is also the feature that we are looking for.  We use Avaya (Nortel) switches from day one and this is the standard feature ever since we have the products.  I never have problem checking the up / down duration of any port with Avaya switches.  I am surprised that Cisco dev just don't care what customers are looking for (and this is not the only feature that is missing)!

Wah wah wah, stay with Nortel if you don't like it. Blaming Cisco Devs just because they can't appease you is just about the most childish thing I've read on these boards. Grow up.

Well, at least I don't think any matured vendor would dare to say to the customer that "That's all we have.  You either take it or leave it.  We don't care if you use our competitors' products if they have better features than us."

It's not something for little kids to play with.  It's the feature that is very useful for our daily troubleshooting and we are not going to give it up and will check other competitive products on the market that offer it.

 

What a childish and funny response SBCounty_TechTree.  It shouldn't be such offensive and irrespectful.

you can use the following command at least to know how many time is rested:

show int dialer 0 | section interface resets

it's give you the times that interface goes down and come up again.

 and output will be like that:

0 output errors, 0 collisions, 0 interface resets

for exact time this command is just offered on Cisco 4500: show int link

i hope that help... 

TomWithnell
Level 1
Level 1

You can run

sh log | incl (portname)

This will list all of the log entries for the specific port. That way you can see the last time it reported in the UP state. Then you can calculate how long that has been.

dsal3389
Level 1
Level 1

if the port is associated with  IP you can do 

 

show ip rib route

 

in the FIB (the routing table) you can see the connected interfaces, but not how much time they were up,

but with the rib table you can see the uptime as well, the connected interfaces will always enter to the routing table

 

example:

>>> show ip rib route | i C

C     94.188.161.100/30 is directly connected, 1d05h, GigabitEthernet0/0.100

you can see the time, but if I do 

>>> show ip route | i C

C        94.188.161.100/30 is directly connected, GigabitEthernet0/0.100

 

ianbirchall
Level 1
Level 1

Im just going to throw this one out there. 
But

show dtp interface [type]{number}

regardless of if you use DTP or not will show you the date that an interface last went up and down. 
show dtp interface TwentyFiveGigE1/0/10
   [--output omitted--]
   3 link ups, last link up on Mon Nov 27 2023, 08:20:27
   2 link downs, last link down on Mon Nov 27 2023, 08:16:32

Kindest Regards,
Ian Tony Birchall
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:

Review Cisco Networking products for a $25 gift card