6

When I run the "show log" command, it displays the latest 360 messages.

Why 360?

Can this value by changed?

If yes, what is the command for that?

Thanks.

  • What equipment are you using? – user36472 Jan 10 '19 at 12:34
7

If you’re using ‘show log’ to display messages in the logging buffer, then you’re using IOS or IOS-XE.

In both of those Cisco operating systems there is a default syslog buffer size (configured in bytes). It happens that you can currently fit 360 messages in that buffer.

You can change the log buffer size to be much larger with: “logging buffered 15000000 debugging”; that command will make your log buffer about 15MB, and will accept log messages at the debug level or higher.

Warning changing your log buffer size will flush the current log buffer.

  • Hello Mike and happy new year 2019. Thank you for your explanation: it's very clear. Indeed, I'm using IOS-XE. – Léa Massiot Jan 10 '19 at 13:05
4

The command show log will always display the full log of the switch/router. Your unit is probably set to the default logging buffer, which is 4096 bytes.

You can change the logging buffer in config mode, by using logging buffered <bytes to log>. We typically use logging buffered 96000 on our switches, which increases the logging buffer to 96 kb instead of the default 4 kb.

A little trick:

If you have a very large log, it can be a bit frustrating looking through months of log before you reach the day in which you think is important. Example log:

Jan  7 12:40:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 68.183.212.251 3 packets
Jan  7 12:55:10.842: %SEC-6-IPACCESSLOGS: list tty_acl denied 1.87.209.253 1 packet
Jan  7 12:55:58.399: %SEC-6-IPACCESSLOGS: list tty_acl denied 125.44.146.175 1 packet
Jan  7 13:04:21.719: %SEC-6-IPACCESSLOGS: list tty_acl denied 178.140.50.247 1 packet
Jan  7 13:23:34.442: %SEC-6-IPACCESSLOGS: list tty_acl denied 119.41.198.91 1 packet
Jan  7 13:29:19.840: %SEC-6-IPACCESSLOGS: list tty_acl denied 69.163.46.118 1 packet
Jan  7 20:43:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 92.63.197.100 1 packet
Jan  7 20:43:50.703: %SEC-6-IPACCESSLOGS: list tty_acl denied 196.52.43.84 1 packet
Jan  7 20:44:57.212: %SEC-6-IPACCESSLOGS: list tty_acl denied 180.111.205.112 1 packet
Jan  7 23:43:45.007: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.250.29 1 packet
Jan  7 23:58:45.007: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.250.29 1 packet
Jan  8 00:11:01.690: %SEC-6-IPACCESSLOGS: list tty_acl denied 58.135.224.45 1 packet
Jan  8 00:13:10.442: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.82.77.139 1 packet
Jan  8 00:16:23.057: %SEC-6-IPACCESSLOGS: list tty_acl denied 209.141.50.57 1 packet
Jan  8 00:18:10.346: %SEC-6-IPACCESSLOGS: list tty_acl denied 199.19.226.226 1 packet
Jan  8 00:19:24.851: %SEC-6-IPACCESSLOGS: list tty_acl denied 194.61.24.146 1 packet
Jan  8 00:19:49.434: %SEC-6-IPACCESSLOGS: list tty_acl denied 199.19.225.65 1 packet
Jan  8 00:20:06.519: %SEC-6-IPACCESSLOGS: list tty_acl denied 45.163.110.194 1 packet
Jan  8 00:24:45.007: %SEC-6-IPACCESSLOGS: list tty_acl denied 194.61.24.146 1 packet
Jan  8 00:25:45.007: %SEC-6-IPACCESSLOGS: list tty_acl denied 199.19.225.65 1 packet
Jan  8 00:26:59.579: %SEC-6-IPACCESSLOGS: list tty_acl denied 139.162.120.98 1 packet
Jan  8 00:28:24.743: %SEC-6-IPACCESSLOGS: list tty_acl denied 124.193.236.138 1 packet
Jan  8 00:29:45.007: %SEC-6-IPACCESSLOGS: list tty_acl denied 199.19.226.226 1 packet
Jan  8 00:30:45.007: %SEC-6-IPACCESSLOGS: list tty_acl denied 209.141.50.57 1 packet
Jan  8 00:34:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 199.19.226.226 1 packet
Jan  8 00:34:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 139.162.120.98 1 packet
Jan  8 00:37:04.391: %SEC-6-IPACCESSLOGS: list tty_acl denied 209.141.52.115 1 packet
Jan  8 11:10:56.272: %SEC-6-IPACCESSLOGS: list tty_acl denied 14.204.211.7 1 packet
Jan  8 11:14:30.578: %SEC-6-IPACCESSLOGS: list tty_acl denied 218.5.36.120 1 packet
Jan  8 11:14:45.007: %SEC-6-IPACCESSLOGS: list tty_acl denied 91.236.116.214 11 packets
Jan  8 23:40:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 185.244.25.105 1 packet
Jan  8 23:40:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 218.92.1.178 3 packets
Jan  8 23:45:45.011: %SEC-6-IPACCESSLOGS: list tty_acl denied 185.244.25.105 1 packet
Jan  9 00:02:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 209.141.52.115 1 packet
Jan  9 00:04:46.291: %SEC-6-IPACCESSLOGS: list tty_acl denied 27.117.75.75 1 packet
Jan  9 00:12:41.502: %SEC-6-IPACCESSLOGS: list tty_acl denied 92.63.197.100 1 packet
Jan  9 00:19:50.913: %SEC-6-IPACCESSLOGS: list tty_acl denied 139.162.120.98 1 packet
Jan  9 00:22:53.205: %SEC-6-IPACCESSLOGS: list tty_acl denied 178.128.174.232 1 packet
Jan  9 00:28:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 178.128.174.232 1 packet
Jan  9 00:30:20.289: %SEC-6-IPACCESSLOGS: list tty_acl denied 194.93.59.14 1 packet
Jan  9 00:31:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 209.141.52.115 1 packet
Jan  9 00:33:45.010: %SEC-6-IPACCESSLOGS: list tty_acl denied 178.128.174.232 3 packets
Jan  9 00:34:07.804: %SEC-6-IPACCESSLOGS: list tty_acl denied 211.220.29.189 1 packet
Jan  9 00:38:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 92.63.197.100 1 packet
Jan  9 00:39:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 178.128.174.232 2 packets
Jan  9 00:46:04.106: %SEC-6-IPACCESSLOGS: list tty_acl denied 82.102.173.75 1 packet
Jan  9 00:47:52.789: %SEC-6-IPACCESSLOGS: list tty_acl denied 151.233.83.216 1 packet
Jan  9 00:48:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 178.128.174.232 1 packet
Jan  9 00:52:36.753: %SEC-6-IPACCESSLOGS: list tty_acl denied 221.6.255.227 1 packet
Jan  9 00:52:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 221.207.32.250 1 packet
Jan  9 21:26:58.936: %SEC-6-IPACCESSLOGS: list tty_acl denied 66.214.40.126 1 packet
Jan  9 21:28:39.250: %SEC-6-IPACCESSLOGS: list tty_acl denied 61.254.59.237 1 packet
Jan  9 21:29:18.579: %SEC-6-IPACCESSLOGS: list tty_acl denied 181.27.212.142 1 packet
Jan  9 21:35:13.229: %SEC-6-IPACCESSLOGS: list tty_acl denied 84.147.129.81 1 packet
Jan  9 21:45:57.942: %SEC-6-IPACCESSLOGS: list tty_acl denied 209.141.52.115 1 packet
Jan  9 21:46:25.840: %SEC-6-IPACCESSLOGS: list tty_acl denied 111.231.249.29 1 packet
Jan  9 21:46:55.313: %SEC-6-IPACCESSLOGS: list tty_acl denied 178.128.174.232 1 
packet
Jan  9 23:55:25.208: %SEC-6-IPACCESSLOGS: list tty_acl denied 93.147.252.146 1 packet
Jan  9 23:58:45.975: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 00:01:33.029: %SEC-6-IPACCESSLOGS: list tty_acl denied 67.207.82.249 1 packet
Jan 10 00:09:29.297: %SEC-6-IPACCESSLOGS: list tty_acl denied 193.234.3.34 1 packet
Jan 10 00:15:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 00:27:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 00:28:05.721: %SEC-6-IPACCESSLOGS: list tty_acl denied 96.67.109.131 1 packet
Jan 10 00:33:35.994: %SEC-6-IPACCESSLOGS: list tty_acl denied 139.59.1.183 1 packet
Jan 10 00:33:45.011: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 01:39:13.017: %SEC-6-IPACCESSLOGS: list tty_acl denied 188.187.52.223 1 packet
Jan 10 01:41:54.761: %SEC-6-IPACCESSLOGS: list tty_acl denied 139.162.120.98 1 packet
Jan 10 01:47:00.554: %SEC-6-IPACCESSLOGS: list tty_acl denied 188.142.151.6 1 packet
Jan 10 01:51:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 01:56:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet

Now if you only want to see the log from January 10, you can use the command

show log | be Jan 10

This will yield:

Jan 10 00:01:33.029: %SEC-6-IPACCESSLOGS: list tty_acl denied 67.207.82.249 1 packet
Jan 10 00:09:29.297: %SEC-6-IPACCESSLOGS: list tty_acl denied 193.234.3.34 1 packet
Jan 10 00:15:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 00:27:45.008: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 00:28:05.721: %SEC-6-IPACCESSLOGS: list tty_acl denied 96.67.109.131 1 packet
Jan 10 00:33:35.994: %SEC-6-IPACCESSLOGS: list tty_acl denied 139.59.1.183 1 packet
Jan 10 00:33:45.011: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 01:39:13.017: %SEC-6-IPACCESSLOGS: list tty_acl denied 188.187.52.223 1 packet
Jan 10 01:41:54.761: %SEC-6-IPACCESSLOGS: list tty_acl denied 139.162.120.98 1 packet
Jan 10 01:47:00.554: %SEC-6-IPACCESSLOGS: list tty_acl denied 188.142.151.6 1 packet
Jan 10 01:51:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet
Jan 10 01:56:45.009: %SEC-6-IPACCESSLOGS: list tty_acl denied 80.211.37.146 1 packet

On the Cisco Nexus platform, you can use the command show log last 50 to see the last 50 log entries.

  • Hello Cown, thank you for the advised value 96000 and the command to see the logs of a given day. Very useful. – Léa Massiot Jan 10 '19 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.