cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
17395
Views
15
Helpful
12
Replies
Highlighted
Beginner

Command to see Switchport Uptime

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?

12 REPLIES 12
Highlighted
Hall of Fame Expert

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

Highlighted
Hall of Fame Community Legend

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.

Highlighted
Engager

Hi,

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

Highlighted
Beginner

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

Highlighted

That's great, thank you!

Highlighted

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

 

Highlighted

hi reza,

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

Highlighted

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

Highlighted

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

Highlighted

Hi,

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

Reza
 

Highlighted

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

 

Highlighted
Beginner

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

 

Content for Community-Ad
This widget could not be displayed.