Examples: Displaying a Log File
Display the contents of the
/var/log/messagesfile stored on the local Routing Engine. (The/var/logdirectory is the default location for log files, so you do not need to include it in the filename. Themessagesfile is a commonly configured destination for system log messages.)user@host>show log messagesApr 11 10:27:25 router1 mgd[3606]: UI_DBASE_LOGIN_EVENT: User 'barbara' entering configuration modeApr 11 10:32:22 router1 mgd[3606]: UI_DBASE_LOGOUT_EVENT: User 'barbara' exiting configuration modeApr 11 11:36:15 router1 mgd[3606]: UI_COMMIT: User 'root' performed commit: no commentApr 11 11:46:37 router1 mib2d[2905]: SNMP_TRAP_LINK_DOWN: ifIndex 82, ifAdminStatus up(1), ifOperStatus down(2), ifName at-1/0/0Display the contents of the file
/var/log/processes, which has been previously configured to include messages from thedaemonfacility. When issuing thefile showcommand, you must specify the full pathname of the file:user@host>file show /var/log/processesFeb 22 08:58:24 router1 snmpd[359]: SNMPD_TRAP_WARM_START: trap_generate_warm: SNMP trap: warm startFeb 22 20:35:07 router1 snmpd[359]: SNMPD_THROTTLE_QUEUE_DRAINED: trap_throttle_timer_handler: cleared all throttled trapsFeb 23 07:34:56 router1 snmpd[359]: SNMPD_TRAP_WARM_START: trap_generate_warm: SNMP trap: warm startFeb 23 07:38:19 router1 snmpd[359]: SNMPD_TRAP_COLD_START: trap_generate_cold: SNMP trap: cold startDisplay the contents of the file
/var/log/processeswhen theexplicit-prioritystatement is included at the[edit system syslog file processes]hierarchy level:user@host>file show /var/log/processesFeb 22 08:58:24 router1 snmpd[359]: %DAEMON-3-SNMPD_TRAP_WARM_START: trap_generate_warm: SNMP trap: warm startFeb 22 20:35:07 router1 snmpd[359]: %DAEMON-6-SNMPD_THROTTLE_QUEUE_DRAINED: trap_throttle_timer_handler: cleared all throttled trapsFeb 23 07:34:56 router1 snmpd[359]: %DAEMON-3-SNMPD_TRAP_WARM_START: trap_generate_warm: SNMP trap: warm startFeb 23 07:38:19 router1 snmpd[359]: %DAEMON-2-SNMPD_TRAP_COLD_START: trap_generate_cold: SNMP trap: cold start