cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
33508
Views
25
Helpful
15
Replies

Command to see Switchport Uptime

Adam Sorenson
Level 1
Level 1

I have a port that I believe is going up and down on a 2960X-port switch.  Is there a command that will show information as to how long that port has been in an "up" state?

15 Replies 15

Reza Sharifi
Hall of Fame
Hall of Fame

I am not sure if there is a command that show that, however if you have monitoring system it will show when and how many times has an interface gone up and down.

HTH

Leo Laohoo
Hall of Fame
Hall of Fame

Look at your logs (if link state logging is enabled) for signs of the interface going down/up. 

Look at the "sh interface <BLAH>" and "sh controll e <BLAH>" any any line errors.  

Run a port TDR to test the integrity of the copper cable.

johnlloyd_13
Level 9
Level 9

Hi,

Just issue the 'show interface fx' command and look under 'Last input/Last output.'

Patryk Szarota
Level 1
Level 1

Switch#show dtp interface
DTP information for FastEthernet1/0/1:
  TOS/TAS/TNS:                              ACCESS/AUTO/ACCESS
  TOT/TAT/TNT:                              UNKNOWN/NEGOTIATE/UNKNOWN
  Neighbor address 1:                       000000000000
  Neighbor address 2:                       000000000000
  Hello timer expiration (sec/state):       never/STOPPED
  Access timer expiration (sec/state):      never/STOPPED
  Negotiation timer expiration (sec/state): never/STOPPED
  Multidrop timer expiration (sec/state):   never/STOPPED
  FSM state:                                S1:OFF
  # times multi & trunk                     0
  Enabled:                                  no
  In STP:                                   no

  Statistics
  ----------
  0 packets received (0 good)
  0 packets dropped
      0 nonegotiate, 0 bad version, 0 domain mismatches,
      0 bad TLVs, 0 bad TAS, 0 bad TAT, 0 bad TOT, 0 other
  0 packets output (0 good)
      0 native, 0 software encap isl, 0 isl hardware native
  0 output errors
  0 trunk timeouts
  1 link ups, last link up on Mon Mar 01 1993, 00:01:37
  1 link downs, last link down on Mon Mar 01 1993, 00:03:13

That's great, thank you!

The "sh dtp interface" command shows the same date for all interfaces.(Year 1993)

1 link ups, last link up on Mon Mar 01 1993, 00:01:37
  1 link downs, last link down on Mon Mar 01 1993, 00:03:13

 

hi reza,

is the year/date not updated due to no NTP or local clock configured?

Hi John,

No, it always shows this same date and time for all the interfaces (1993) even though the switch is configure with the correct date and time.  I don't think this command actually woks.

HTH

i see. i feel this command is only for trunks using DTP and not for access ports.

Hi,

The same output show up for trunk ports as well as access ports.

Reza
 

Thanks for this!  I believe the 1993 timestamp is from when the switch first booted, before it set its clock. 

 

On one of my 3750's ports that have never gone down show a 1993 timestamp, ports that have gone up/down have a recent (correct) date

1 link ups, last link up on Sun Feb 28 1993, 16:01:20

4 link ups, last link up on Tue Dec 02 2014, 14:51:11

 

techbjs08
Level 1
Level 1

Adam,

Try the following commands. This will give you the last up information. Someone else in the community shared this with me quite awhile back. It has helped us a lot.

For a single interface.
Cisco-Switch#show int g1/0/7
  Last input never, output 1y25w, output hang never

For all interfaces.
Cisco-Switch#show int | in Last | proto

 

I think this command will give u the uptime of that interface 

sh int gx/x/x | i minute

 

Thierry C
Level 1
Level 1

I think there is not a 'ready to use' command to that on a 2960 model.

AS well as there is

SHOW INT Gx/0/x LINK

on IOS XE Ver 17

Review Cisco Networking for a $25 gift card