Celestica Documentation Portal

Find your product documents here

show log

Displays the n lines of syslog information of the corresponding process.

Syntaxshow log <process> <lines>
Command ModeEXEC
Parameters
  • process – Name of the system process. Accepts a string of maximum 32 characters.
  • lines – Number of lines to be displayed. Accepts an integer of range 1 to 256.
UsageNone
Supported Releases1.0.0 or later
Click Commandshow logging [OPTIONS] [PROCESS]
Example
sonic# show log pattern mgmt-framework lines 10
Mar  3 08:24:35.788112 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787007      16 handler.go:48] [REST-7] GET /restconf/data/openconfig-system:system/openconfig-system-cls-ext:log/syslog_list="mgmt-framework",10; content-len=0
Mar  3 08:24:35.788273 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787047      16 handler.go:56] [REST-7] Translated path = /openconfig-system:system/openconfig-system-cls-ext:log/syslog_list[process="mgmt-framework"][lines=10]
Mar  3 08:24:35.788342 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787056      16 translib.go:491] Received Get request for path = /openconfig-system:system/openconfig-system-cls-ext:log/syslog_list[process="mgmt-framework"][lines=10]
Mar  3 08:24:35.788420 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787063      16 app_interface.go:129] getAppModule called for path =/openconfig-system:system/openconfig-system-cls-ext:log/syslog_list[process="mgmt-framework"][lines=10]
Mar  3 08:24:35.789948 sonic INFO sonic-host-server: command: ['show', 'logging', '-l', '10', '"mgmt-framework"']
Mar  3 08:24:35.792408 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787542      16 sys_app.go:93] SysApp: initialize:sys:path =/openconfig-system:system/openconfig-system-cls-ext:log/syslog_list[process="mgmt-framework"][lines=10]
Mar  3 08:24:35.792408 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787601      16 sys_app.go:285] SysApp: translateGet:system:path =&{/openconfig-system:system/openconfig-system-cls-ext:log/syslog_list[process="mgmt-framework"][lines=10] /openconfig-system:system/openconfig-system-cls-ext:log/syslog_list{}{} map[lines:10 process:"mgmt-framework"]}
Mar  3 08:24:35.792408 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787609      16 sys_app.go:641] SysApp: processGet Path: /openconfig-system:system/openconfig-system-cls-ext:log/syslog_list[process="mgmt-framework"][lines=10]
Mar  3 08:24:35.792408 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787693      16 sys_app.go:644] Received GET for path /openconfig-system:system/openconfig-system-cls-ext:log/syslog_list[process="mgmt-framework"][lines=10]; template_info: /openconfig-system:system/openconfig-system-cls-ext:log/syslog_list{}{} vars=map[lines:10 process:"mgmt-framework"]
Mar  3 08:24:35.792408 sonic INFO mgmt-framework#/supervisord: rest-server I0303 08:24:35.787721      16 sys_app.go:656] targetUriPath : /openconfig-system:system/openconfig-system-cls-ext:log/syslog_list Args: map[lines:10 process:"mgmt-framework"]

sonic# show log lines 10
May 18 13:48:48.237992 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.235726      25 sys_app.go:713] Received GET for path /openconfig-system:system/openconfig-system-cls-ext:log/syslog[process=All][lines=10]; template_info: /openconfig-system:system/openconfig-system-cls-ext:log/syslog{}{} vars=map[lines:10 process:All]
May 18 13:48:48.238133 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.235875      25 sys_app.go:725] targetUriPath : /openconfig-system:system/openconfig-system-cls-ext:log/syslog Args: map[lines:10 process:All]
May 18 13:48:48.238273 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.236041      25 sys_app.go:922] Handeling logging Get process
May 18 13:48:48.238414 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.236055      25 sys_log.go:25] Handleing Getlog Function
May 18 13:48:48.238792 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.236070      25 sys_log.go:28] Building Log empty tree
May 18 13:48:48.238936 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.236083      25 sys_log.go:80] get logAll info using dbus entry
May 18 13:48:48.239076 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.236098      25 host_comm.go:20] HostQuery called
May 18 13:48:48.239213 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.236110      25 host_comm.go:35] HostQueryAsync called on endpoint 'system_mgmt.show'
May 18 13:48:48.239351 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.236126      25 host_comm.go:42] HostQueryAsync conn established
May 18 13:48:48.239490 sonic INFO mgmt-framework#/supervisord: rest-server I0518 13:48:48.236161      25 host_comm.go:71] HostQueryAsync Before objgo