cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
195
Views
1
Helpful
4
Replies

Cisco Switch local logging

uni1389
Level 1
Level 1

Hello all 

am not able to see  logs enteries on cisco switch using ssh . Just to understand is there any difference to use Console or SSH to show logging. I have the following configuration on switch . Thanks for tips and tricks  

 

**********************************

show runn


logging count
logging persistent
logging console emergencies
 !

**********************************
show logg
Syslog logging: enabled (0 messages dropped, 0 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)

No Active Message Discriminator.

 

No Inactive Message Discriminator.


Console logging: disabled
Monitor logging: level debugging, 0 messages logged, xml disabled,
filtering disabled
Buffer logging: level debugging, 12 messages logged, xml disabled,
filtering disabled
Exception Logging: size (4096 bytes)
Count and timestamp logging messages: disabled
File logging: disabled
Persistent logging: enabled, url flash:/syslog, disk space 24471142 bytes, file size 262144 bytes, batch size 4096 bytes

No active filter modules.

Trap logging: level informational, 44 message lines logged
Logging Source-Interface: VRF Name:

Log Buffer (4096 bytes):

Jun 2 21:28:46.717: %SYS-5-LOG_CONFIG_CHANGE: Buffer logging: level debugging, xml disabled, filtering disabled, size (4096)
Jun 2 21:28:47.428: %SYS-5-CONFIG_I: Configured from console by admin01 on vty5 (10.60.10.178)
Jun 2 21:29:56.447: %SYS-5-CONFIG_I: Configured from console by admin01 on vty5 (10.60.10.178)
Jun 2 21:30:20.470: %SYS-5-CONFIG_I: Configured from console by admin01 on vty5 (10.60.10.178)
Jun 2 21:30:52.687: %SYS-5-LOG_CONFIG_CHANGE: Console logging: level debugging, xml disabled, filtering disabled
J
Jun 2 21:34:33.998: %SYS-5-LOG_CONFIG_CHANGE: Console logging disabled
Jun 2 21:34:34.770: %SYS-5-CONFIG_I: Configured from console by admin01 on vty5 (10.60.10.178)

**********************************

 

4 Replies 4

Richard Burts
Hall of Fame
Hall of Fame

Let me address several things in your post:

-  "is there any difference to use Console or SSH to show logging" Yes there are significant differences. 

: if you are in a console session (and if console logging is enabled) you will automatically see log messages in real time. If you want to see older messages you can use the show logging command.

: if you are in a SSH connection by default you do not see log messages. You  can use the terminal monitor command to enable seeing current messages in real time. And to see older log messages you can use the show log command.

- there are various levels of log messages and you can specify what level of messages you want to see. You have configured the console as "logging console emergencies"  which means that on the console you will see only the most drastic of the messages. And in fact looking further in your post we find this "Console logging: disabled" which says no messages at all for the console. I suggest that you change this.

HTH

Rick

BTW, what Rick describes, you could substitute Telnet for SSH.

Also BTW, what make "console" unique, it's hardware (RS232 UART?) is supported at a very low and early sequence by the software.  For example, ROMMON and IOS boot up messages.

Don't know if still a consideration, but I recall best practice was to avoid sending unnecessary traffic to console at it had an impact to normal device operation.

I think you talking about real time log which need 

terminal monitor

for no real time both console and ssh show same log when you run show log

MHM

monika_kispal
Level 1
Level 1

Hi. To send log messages to users on terminal, you also have to add the logging monitor command on IOS. Syslog chapter in Odom.