09-03-2011 06:54 PM - edited 03-07-2019 02:02 AM
Dear all,
If I do a show log command on switch it starts showing logs which are several months old.
How can I filter those to show only last month log -like pipe is one way or anything to be set on switch.
Also if I do sh log and if it starts showing logs for last 6 months then i can't break it and hence might b causing overhead.
Please advise.
Sent from Cisco Technical Support iPhone App
09-04-2011 07:12 AM
Hi,
You can filter your syslogs using the pipe command.
Switch#sh log | i Aug
You can lower the syslog buffer on your switch or use a dedicated syslog server in to prevent any overhead.
Sent from Cisco Technical Support iPhone App
09-04-2011 06:31 PM
Hi,
I believe there is no other options to view the logs options apart from using the pipe filter.
or we can tune the logging level in such a way to capture only the interested message by applying the below options.
There are eight levels of logging. If you specify a particular level of logging for console logging, for example the messages of that level and of the higher levels (numerically lower) are forwarded to the console.
Level | Logging Message |
0 | Emergencies |
1 | Alerts |
2 | Critical |
3 | Errors |
4 | Warnings |
5 | Notifications |
6 | Informational |
7 | Debugging |
Router(config)# logging monitor error
Now let us discuss the anatomy of the logging messages. Each message is associated with one of the eight levels of logging, which is referred to as the severity of the message
Level Name | Severity | Description | Syslog Definition |
Emergencies | 0 | System unusable | LOG_EMERG |
Alerts | 1 | Immediate action needed | LOG_ALERT |
Critical | 2 | Critical conditions | LOG_CRIT |
Errors | 3 | Error conditions | LOG_ERR |
Warnings | 4 | Warning conditions | LOG_WARNING |
Notifications | 5 | Normal significant conditions | LOG_NOTICE |
Informational | 6 | Informational messages only | LOG_INFO |
Debugging | 7 | Debugging messages | LOG_DEBUG |
Hope this helps
Cheers
Somu
Rate helpful posts
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide