Inspecting local event logs is the fastest way to diagnose flapping interfaces, spanning-tree topology changes, authentication failures, and hardware faults on a Cisco Catalyst switch. Whether you are troubleshooting an intermittent port outage in real time or conducting a post-incident root-cause analysis after an unexpected reload, Cisco IOS and IOS-XE provide built-in command-line utilities, persistent memory registers, and external forwarding mechanisms to capture system events.
Checking switch logs effectively requires knowing which CLI filters to run, how to ensure the local RAM buffer and clock timestamps are properly initialized, how to decode standard Syslog message headers, and where to recover diagnostic data when a reboot wipes volatile memory.
Table of Contents
Checking and Filtering Cisco Switch Logs via the CLI
To view and search local event logs stored in the switch’s RAM buffer, execute the show logging command from privileged EXEC mode (#) alongside regular-expression pipe filters (| include, | exclude, | begin). Use the following CLI commands and fill-in-the-blank templates to extract specific operational events:
! 1. View the complete local log buffer and current logging configuration status
Switch# show logging
! 2. Disable pagination to dump the entire log buffer without "--More--" prompts
Switch# terminal length 0
Switch# show logging
Switch# terminal length 24
! 3. View only the most recent N lines of the log buffer (Cisco IOS-XE / Catalyst 9000)
Switch# show logging last <number-of-lines>
Switch# show logging last 50
! 4. Template: Filter logs for a specific physical interface or Port-channel
Switch# show logging | include <interface-type-and-number>
Switch# show logging | include GigabitEthernet1/0/12|Gi1/0/12
Switch# show logging | include Port-channel1
! 5. Check physical port and line-protocol up/down state transitions
Switch# show logging | include UPDOWN|LINEPROTO
! 6. Filter for Layer 2 instability (err-disabled ports, MAC flapping, or STP changes)
Switch# show logging | include ERR_DISABLE|MACFLAP|SPANTREE|DUPLEX
! 7. Template: Filter logs by date, timestamp window, or starting event
Switch# show logging | include <Month> <Day> <HH:MM>
Switch# show logging | include Mar 15 14:
Switch# show logging | begin Mar 15 08:30
! 8. Template: Exclude noisy recurring events (such as SNMP polling or routine SSH logins)
Switch# show logging | exclude <keyword-1>|<keyword-2>
Switch# show logging | exclude SNMP|SEC_LOGIN-5-LOGIN_SUCCESS
! 9. Monitor live log messages in real time over an active SSH or Telnet session
Switch# terminal monitor
! (Run "terminal no monitor" to stop live terminal output)
Key Takeaway: Always combine show logging with case-sensitive | include regular expressions to isolate target interfaces or error mnemonics without scrolling through thousands of routine informational lines.
Enabling Buffered Logging and Timestamps When Logs Are Missing
If running the CLI commands above returns an empty output, truncated history, or log lines missing dates and times, the switch’s local RAM buffer (logging buffered) or timestamp service (service timestamps) is either disabled or under-allocated. Follow these sequential steps to initialize local log capture and accurate time tracking.
Step 1: Verify the Current Logging State and System Clock
Before changing parameters, check whether the logging subsystem is active and confirm that the software clock is synchronized.
Switch# show clock detail
Switch# show logging | include Syslog logging|Log Buffer
If the header displays Syslog logging: disabled or Log Buffer (0 bytes), local capture is turned off. Additionally, ensure your switch is synchronized via NTP (ntp server <ip-address>) or manually set (clock set hh:mm:ss day month year), otherwise log timestamps will default to uptime ticks or arbitrary epochs.
Step 2: Enable Global Logging and Expand the RAM Buffer Size
By default, older Cisco IOS images allocate only 4,096 bytes to the RAM buffer, which fills up and overwrites itself within minutes during a port flap. Enter global configuration mode, enable the logging process, and allocate 65,536 to 131,072 bytes at the informational (level 6) threshold:
Switch# configure terminal
Switch(config)# logging on
Switch(config)# logging buffered 65536 informational
Allocating 64 KB to 128 KB preserves several days of operational history without impacting switch DRAM utilization.
Step 3: Configure Millisecond, Timezone, and Year Timestamps
Without timestamp formatting enabled, log entries either omit the date entirely or display time elapsed since boot. Configure the switch to prepend the full calendar date, local timezone, and millisecond precision, along with sequential event numbers:
Switch(config)# service timestamps log datetime msec localtime show-timezone year
Switch(config)# service sequence-numbers
Step 4: Verify Interface Link-Status Logging
If general system events appear in the buffer but physical port up/down events are missing, verify that link-status event logging has not been suppressed globally or on individual access ports:
Switch(config)# logging event link-status default
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# logging event link-status
Switch(config-if)# logging event trunk-status
Switch(config-if)# end
Step 5: Test and Save the Configuration
Inject a test string into the local syslog daemon to confirm that timestamps and buffer storage work properly, then save the running configuration to NVRAM:
Switch# send log "Local buffered logging verification test"
Switch# show logging | include verification test
Switch# copy running-config startup-config
Key Takeaway: Configuring a 64 KB+ logging buffered allocation paired with service timestamps log datetime msec localtime show-timezone year ensures that local logs persist across bursts of activity and align accurately with real-world incident timelines.
Understanding Cisco Syslog Message Format and Severity Levels 0 to 7
Once your switch is actively recording timestamped events, locating the root cause of a network issue requires decoding the standardized Cisco Syslog syntax and filtering by severity level.
Step 1: Dissect the Anatomy of a Cisco Log Entry
Every Cisco IOS and IOS-XE system message follows a strict structural format:
001425: Mar 15 14:22:08.412 EDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/24, changed state to down
Read each segment from left to right:
1. Sequence Number (001425:): Appears when service sequence-numbers is enabled, confirming no messages were dropped between sequential events.
2. Timestamp (Mar 15 14:22:08.412 EDT:): Shows the exact local time of the event. Look closely at the character immediately preceding the month:
– No prefix: The switch clock is authoritative and synchronized via NTP.
– Asterisk (*Mar 15...): The clock is unsynchronized and running on unverified software time.
– Period (.Mar 15...): The clock was previously synchronized via NTP but has lost reachability to its time server.
3. Facility (%LINEPROTO): Identifies the hardware module, protocol, or software process that generated the message. Common Cisco switch facilities include LINK (physical layer), LINEPROTO (data link layer), SPANTREE (Spanning Tree Protocol), PM (Port Manager), SW_MATM (MAC address table manager), and SEC_LOGIN (AAA/authentication).
4. Severity Level (-5-): A single digit from 0 to 7 rating the operational impact of the event.
5. Mnemonic (UPDOWN:): A standardized uppercase keyword that uniquely defines the event type within that facility (such as ERR_DISABLE, MACFLAP_NOTIF, or CONFIG_I).
6. Message Description: The variable plaintext payload specifying affected interfaces, VLAN IDs, MAC addresses, or administrator IP addresses.
Step 2: Interpret the 0–7 Syslog Severity Scale
Cisco switches classify events along the standard eight-tier Syslog severity scale. When you configure a logging destination (such as logging buffered informational as configured above), the switch captures that threshold level and all numerically lower (more critical) levels:
- Level 0 — Emergencies (
emergencies): The switch is completely unusable due to a catastrophic fault, such as an imminent thermal shutdown or critical backplane failure. - Level 1 — Alerts (
alerts): Immediate administrative intervention is required to prevent outage, such as environmental temperature thresholds exceeding critical operating limits. - Level 2 — Critical (
critical): Severe hardware or systemic failures, including redundant power supply failure, fan tray failure, or supervisor memory allocation exhaustion (MALLOCFAIL). - Level 3 — Errors (
errors): Operational error conditions affecting traffic forwarding or physical connectivity, such as physical port state transitions (%LINK-3-UPDOWN) or transceiver integrity faults. - Level 4 — Warnings (
warnings): Abnormal network conditions that have triggered protective policies or degrade performance, including ports placed into an error-disabled state (%PM-4-ERR_DISABLEfrom BPDU Guard or port security), Layer 2 MAC address flapping (%SW_MATM-4-MACFLAP_NOTIF), or half/full duplex mismatches (%CDP-4-DUPLEX_MISMATCH). - Level 5 — Notifications (
notifications): Normal but significant operational milestones, such as Layer 2 line-protocol state changes (%LINEPROTO-5-UPDOWN), administrator configuration edits (%SYS-5-CONFIG_I), and port-security audit notices. - Level 6 — Informational (
informational): Routine high-volume status messages, diagnostic telemetry, and access-control list (ACL) match logs. - Level 7 — Debugging (
debugging): Real-time packet-level and process-level traces produced only when an engineer executes adebugcommand.
Key Takeaway: Focus initial troubleshooting on Severity Levels 0 through 4 (-[0-4]- in regex filters) to immediately surface hardware faults, physical link drops, and error-disabled ports while bypassing routine informational noise.
Investigating Persistent Logs and Crashinfo After an Unexpected Reboot
Because the standard show logging buffer resides in volatile DRAM, an unexpected power loss, watchdog timeout, or software crash wipes the log history upon reload. To determine why a Cisco switch rebooted, follow this sequential post-mortem workflow using non-volatile storage registers.
Step 1: Check the Last Reload Reason
Start by querying the switch’s hardware supervisor register to determine whether the reboot was triggered by a power outage, a scheduled command, or a software exception:
Switch# show version | include uptime|reload|reason
On Catalyst 9000 series switches running IOS-XE, inspect the historical reload log across stack members:
Switch# show reload history
Switch# show redundancy | include Reload|uptime
power-onorPower Failureindicates an external AC power drop or unseated power cord (verify UPS and PSU seating).Reload Commandindicates an administrator or automation script intentionally executedreload.Critical process ... faultorWatchdog timeoutindicates an IOS/IOS-XE software crash.
Step 2: Inspect Flash and Crashinfo Directories for Crash Dumps
When Cisco IOS or IOS-XE encounters a fatal software exception or CPU bus error, it writes a diagnostic file to non-volatile flash memory right before resetting—including a snapshot of the active syslog buffer at the moment of failure. List the contents of the local filesystems:
Switch# dir crashinfo:
Switch# dir flash: | include crash|core
If you find a crashinfo_<date-timestamp> file, display its contents and search for the embedded log buffer or exception summary:
Switch# more crashinfo:crashinfo_20260315-031422-EDT | begin ---- show logging ----
On Catalyst 9200/9300/9400/9500 platforms, check dir flash:core/ for .tar.gz system reports and .core.gz files that can be decoded by Cisco TAC.
Step 3: Query Onboard Failure Logging (OBFL) for Hardware Telemetry
Managed Catalyst switches include Onboard Failure Logging (OBFL), which records environmental sensors, PSU voltage drops, PoE faults, and hardware error messages into dedicated non-volatile flash memory separate from the operating system. Run the following commands to inspect persistent hardware logs:
Switch# show logging onboard switch 1 status
Switch# show logging onboard switch 1 uptime detail
Switch# show logging onboard switch 1 temperature detail
Switch# show logging onboard switch 1 voltage detail
Switch# show logging onboard switch 1 message detail
If OBFL is disabled on your hardware platform, enable it in global configuration mode (hw-module switch <1-9> logging onboard) so future thermal or voltage anomalies are preserved across power cycles.
Step 4: Configure Persistent Flash Logging for Standard Syslog Events
If you lack an external network connection at a remote site and need standard syslog messages to survive a power outage, configure the switch to write circular log files directly to flash::
Switch(config)# mkdir flash:/syslog
Switch(config)# logging persistent url flash:/syslog size 10485760 filesize 1048576
This restricts total flash usage to 10 MB across rotating 1 MB files, protecting flash storage from wear or exhaustion while keeping pre-reboot logs accessible via more flash:/syslog/<filename>.
Key Takeaway: Even when volatile RAM is cleared by a reboot, combining show version reload reasons, crashinfo: dumps, and show logging onboard hardware telemetry exposes whether the outage stemmed from facility power loss, thermal exhaustion, or an IOS software defect.
Comparing the Best Syslog Servers and Log Analyzers for Cisco Switches
While local flash and OBFL help diagnose isolated reboots, enterprise production networks require centralized log retention, real-time alerting, and multi-switch correlation. By configuring logging host <server-ip> and logging trap informational on your switches, you can stream events over UDP port 514 (or TCP/TLS port 6514) to a dedicated log analyzer.
The table below compares the primary Syslog servers and centralized log management platforms used in Cisco Catalyst environments:
| Tool / Platform | Deployment & OS Support | Free Tier / Licensing Model | Cisco-Specific Parsing & Alerting Capabilities | Best Use Case & Network Scale |
|---|---|---|---|---|
| SolarWinds Kiwi Syslog Server | On-premises (Windows Server / Desktop) | 14-day full trial; commercial subscription or perpetual licensing (legacy Free Edition discontinued for new downloads) | Native regex filtering on %FACILITY-SEVERITY-MNEMONIC, real-time console views, automated email/script triggers on port flaps or CONFIG_I events | Small-to-midsize IT teams seeking a lightweight, Windows-based GUI daemon for straightforward Syslog collection and alerting |
| Graylog (Open / Enterprise) | On-premises (Linux / Docker) or Cloud | Graylog Open is 100% free and open-source; Security/Enterprise tiers licensed by daily ingestion volume (GB/day) | Built-in Content Packs and Grok/Pipeline extractors that parse Cisco IOS/IOS-XE fields (Facility, Mnemonic, Interface, MAC) into searchable dashboards | Mid-to-large enterprises needing high-speed full-text search, custom correlation dashboards, and scalable retention |
| Paessler PRTG Network Monitor | On-premises (Windows) or Cloud-hosted | Free forever up to 100 sensors; commercial tiers licensed by total sensor count | Combines Syslog Receiver sensors directly with SNMP interface traffic, CPU, and Cisco EnvMon health metrics in a unified alerting view | Network administrators who want unified SNMP performance monitoring and Syslog alerting inside a single platform |
| ManageEngine EventLog Analyzer | On-premises (Windows / Linux) | Free Edition supports up to 5 log sources; paid editions licensed by number of switches/devices | Pre-built Cisco switch audit templates, compliance reporting (PCI-DSS, HIPAA, ISO 27001), and out-of-the-box alerts for AAA/login failures and config changes | Organizations prioritizing automated compliance auditing, configuration change tracking, and turnkey Cisco reports |
| Syslog-ng / Rsyslog + ELK Stack | On-premises (Linux / Kubernetes) or Elastic Cloud | Core open-source engines are free; managed cloud or enterprise features billed by resource consumption | High-throughput ingestion capable of parsing millions of Cisco events per second via custom Logstash/Filebeat Cisco IOS modules | Large enterprise, campus, and service provider networks with Linux engineering resources and high log volumes |
Key Takeaway: Select a lightweight collector like Kiwi Syslog or PRTG for rapid alerting in smaller environments, or deploy an indexed analytics platform like Graylog or the ELK Stack when you need deep historical querying and cross-switch event correlation across hundreds of Catalyst switches.
Cisco IOS and IOS-XE System Message Logging Reference Architecture
Architectural Overview
Cisco System Message Logging is the standardized telemetry subsystem embedded in Cisco IOS and Cisco IOS-XE software. It processes internal kernel events, protocol state changes, and hardware interrupts, formatting them according to RFC 3164 (BSD Syslog) or RFC 5424 specifications and routing them to five independent output queues.
Logging Destination Specifications
Each logging destination operates independently with its own administrative state, transport mechanism, and default severity filter:
- Console Logging (
logging console): Directs system messages to the physical EIA/TIA-232 RJ-45 or USB mini-B console port. Enabled by default at severity leveldebugging(7). Synchronous output (logging synchronous) prevents unsolicited syslog messages from interrupting active CLI keyboard input. - Buffered Logging (
logging buffered): Copies system messages to an internal circular ring buffer in volatile DRAM. Enabled by default on modern Catalyst IOS-XE platforms at severity levelinformational(6) ordebugging(7). Oldest messages are overwritten first on a First-In, First-Out (FIFO) basis once the byte threshold is reached. - Terminal Monitor Logging (
logging monitor): Forwards system messages to active virtual teletype (VTY) sessions over SSH or Telnet when invoked per session via theterminal monitorprivileged EXEC command. Default severity threshold isdebugging(7). - Trap / External Host Logging (
logging host/logging trap): Encapsulates system messages into Syslog datagrams (default UDP port 514) and transmits them to configured IPv4 or IPv6 collectors. Default severity threshold isinformational(6). Source interface binding is controlled statically vialogging source-interface <interface-id>. - SNMP Trap Logging (
logging history): Populates theCISCO-SYSLOG-MIBhistory table and dispatches syslog notifications as SNMP traps to registered network management stations whensnmp-server enable traps syslogis configured. Default severity threshold iswarnings(4).
Authoritative Cisco Documentation Manuals and Diagnostic Utilities
Network administrators referencing official platform behaviors, release-specific command syntax, or unknown error mnemonics should consult four primary Cisco documentation sets:
- System Management Configuration Guide (System Message Logging Chapter): Published per hardware family and software train (e.g., Cisco Catalyst 9300 Series Switches — Cisco IOS XE System Management Configuration Guide). Defines platform-specific buffer limits, persistent flash support, TLS-encrypted syslog configurations, and VRF-aware logging syntax.
- System Messages and Recovery Procedures Reference Guide: The exhaustive dictionary for Cisco IOS and IOS-XE releases. Entries are indexed alphabetically by
%FACILITY-SEVERITY-MNEMONICand provide three mandatory specifications per message: Explanation (the underlying software or hardware condition), Recommended Action (the exact sequence of verification steps or TAC data-collection commands), and Related Documents. - Cisco IOS Network Management Command Reference: Provides the formal syntax definitions, default states, command modes, and release modification histories for all
logging,service timestamps, andshow loggingCLI statements. - Cisco Error Message Decoder (EMD) and Cisco CLI Analyzer: Official web and desktop diagnostic tools accessible via the Cisco Support Portal. These utilities ingest raw
show logginglines or fullshow tech-supportbundles, automatically matching observed%FACILITY-SEVERITY-MNEMONICstrings against active Cisco Bug IDs (CSCxx#####) and published Field Notices.
Key Takeaway: Always verify unfamiliar %FACILITY-SEVERITY-MNEMONIC codes against the official Cisco System Messages and Recovery Procedures Reference Guide or the Cisco Error Message Decoder to confirm whether an event requires local configuration adjustments, hardware RMA, or an IOS-XE software upgrade.
Conclusion
Checking and managing logs on a Cisco switch goes far beyond running a basic show logging command. By applying targeted regular-expression pipe filters, sizing your local RAM buffer with millisecond NTP timestamps, and prioritizing Severity Levels 0 through 4, you can rapidly isolate port flaps, Layer 2 loops, and security violations. When unexpected reloads wipe volatile memory, inspecting show version reload registers, crashinfo: dumps, and OBFL hardware counters ensures crucial diagnostic evidence is still recoverable—while forwarding events to an external Syslog analyzer preserves long-term visibility across your entire switching infrastructure.











Comments