Accessing Logs on FlexSwitch

FlexSwitch CLI provides the ability to view Syslog information and Kernel log information from the logs.

Viewing the Syslog

Use the show log syslog lines (n) CLI command to display a given number of syslog lines.

localhost(config)#show log syslog lines 10
Applying Show:
total lines 10
Aug  3 19:01:51 localhost ConfigMgr[11401]: [ERR]  [objHdl nil for SystemAPIConfig]
Aug  3 19:03:41 localhost ConfigMgr[11401]: [ERR]  [objHdl nil for SystemAPIConfig]
Aug  3 19:05:01 localhost CRON[12311]: [INFO]  (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Aug  3 19:08:25 localhost ConfigMgr[11401]: [ERR]  [objHdl nil for SystemAPIConfig]
Aug  3 19:10:01 localhost CRON[12321]: [INFO]  (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
Aug  3 19:15:01 localhost CRON[12336]: [INFO]  (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Aug  3 19:17:01 localhost CRON[12344]: [INFO]  (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug  3 19:20:01 localhost CRON[12353]: [INFO]  (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
Aug  3 19:25:01 localhost CRON[12383]: [INFO]  (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Aug  3 19:30:01 localhost CRON[12391]: [INFO]  (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
sdk:printLog(syslog,10,) result: SUCCESS

Viewing the Kernel Log

Use the show log kernel lines (n) command to display a given number of kernel log lines.

localhost(config)#show log kernel lines 10
Applying Show:
total lines 10
Aug  3 18:14:51 localhost kernel: [INFO] [169184.480000] rtnetlink_event: fpPort1: ifindex 32 admin DOWN operstate DOWN
Aug  3 18:14:58 localhost kernel: [INFO] [169192.170000] rtnetlink_event: fpPort52: ifindex 58 admin DOWN operstate DOWN
Aug  3 18:15:17 localhost kernel: [NOTICE] [169211.200000] type=1305 audit(1501784117.911:3605): audit_pid=0 old=1982 auid=4294967295 ses=4294967295 res=1
Aug  3 18:15:17 localhost kernel: [NOTICE] [169211.240000] type=1106 audit(1501784117.951:3606): user pid=12034 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:session_clo
se acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
Aug  3 18:15:18 localhost kernel: [NOTICE] [169211.260000] type=1104 audit(1501784117.971:3607): user pid=12034 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acc
t="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
Aug  3 18:15:18 localhost kernel: [NOTICE] [169211.350000] type=1123 audit(1501784118.061:3608): user pid=12057 uid=0 auid=4294967295 ses=4294967295 msg='cwd="/" cmd=736572
7669636520617564697464207374617274 terminal=? res=success'
Aug  3 18:15:18 localhost kernel: [NOTICE] [169211.360000] type=1110 audit(1501784118.071:3609): user pid=12057 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acc
t="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
Aug  3 18:15:18 localhost kernel: [NOTICE] [169211.380000] type=1105 audit(1501784118.091:3610): user pid=12057 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:session_ope
n acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
Aug  3 18:15:18 localhost kernel: [NOTICE] [169211.440000] type=1305 audit(1501784118.151:3611): audit_enabled=1 old=1 auid=4294967295 ses=4294967295 res=1
Aug  3 18:15:18 localhost kernel: [NOTICE] [169211.450000] type=1305 audit(1501784118.161:3612): audit_pid=12064 old=0 auid=4294967295 ses=4294967295 res=1
sdk:printLog(kernel,10,) result: SUCCESS