Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

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
VIP Super Bronze

I am not sure if there is a

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

Hall of Fame Super Gold

Look at your logs (if link

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.

Hi,Just issue the 'show

Hi,

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

New Member

Switch#show dtp interfaceDTP

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

New Member

That's great, thank you!

That's great, thank you!

VIP Super Bronze

The "sh dtp interface"

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

hi reza,

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

VIP Super Bronze

Hi John,No, it always shows

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

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

VIP Super Bronze

Hi,The same output show up

Hi,

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

Reza
 

New Member

Thanks for this!  I believe

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

 

New Member

Adam,Try the following

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

 

6471
Views
0
Helpful
12
Replies
CreatePlease to create content