cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
103667
Views
11
Helpful
4
Replies

How to show history log on port ?

sonph
Level 1
Level 1

Hello everyone,

I have a problem when operating network system, in our company we used cisco 2960. When the network failure cause port errors. I want to show the history log by date, and troubleshoot why the port has been error.  What command i should use on CLI? Thank you very much ! 

1 Accepted Solution

Accepted Solutions

Hello,

not sure what exactly you mean. 

The 'show log history' command can be followed by any output modifier.Can you give an example of what you want to see ?

View solution in original post

4 Replies 4

Hello,

not sure what exactly you mean. 

The 'show log history' command can be followed by any output modifier.Can you give an example of what you want to see ?

Dear sir,

I want to know the activity of switchport , for example : the port has been err-disable cause attenuation, and how many % loss; or the port down at what time its on/off (the timeline activity)

Hello,

you can use any of the output modifiers listed below.

In your case, to see the cause for err-disabled ports, use:

2960#show log history | inc err-disable

Similarly, you can filter any output you need from the full log.

2960#sh log history | ?
append Append redirected output to URL (URLs supporting append operation
only)
begin Begin with the line that matches
count Count number of lines which match regexp
exclude Exclude lines that match
format Format the output using the specified spec file
include Include lines that match
redirect Redirect output to URL
section Filter a section of output
tee Copy output to URL

you could use

Switch1#show log | i 1/0/50
Jun 12 14:38:03.679: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/50, changed state to down
Jun 12 14:38:04.685: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/50, changed state to down
Jun 12 14:38:19.960: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/50, changed state to up
Jun 12 14:38:22.644: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/50, changed state to up

Review Cisco Networking products for a $25 gift card