show logging cli

Use this command to display command history for all users.

Command Syntax

Copy
show logging cli ((logfile LOGFILENAME)|) (match-pattern WORD |)
show logging cli last <1-9999>
show logging logfile list

Parameters

LOGFILENAME

Name of a saved command history log file. The default path is /var/log/messages, but you can specify a full path to override the default.

WORD

Display only lines with this search pattern.

<1-9999>

Number of lines to display from the end of the command history.

logfile list

Display a list of command history files.

Default

LOGFILENAME Name of a saved command history log file. The default path is /var/log/messages, but you can specify a full path to override the default.

Command Mode

Execution mode

Applicability

This command was introduced before OcNOS version 1.3.

Example

Copy
#sh logging cli
2017 Mar 01 16:30:59 :  : User root@/dev/pts/1 : CLI : 'exit'
2017 Mar 01 16:31:06 :  : User root@/dev/pts/1 : CLI : 'sh logging logfile list'
#sh logging cli logfile ipi
2017 Mar 01 16:30:59 :  : User root@/dev/pts/1 : CLI : 'exit'
2017 Mar 01 16:31:06 :  : User root@/dev/pts/1 : CLI : 'sh logging logfile list'
#sh logging cli match-pattern root
2017 Mar 01 16:30:59 :  : User root@/dev/pts/1 : CLI : 'exit'
2017 Mar 01 16:31:06 :  : User root@/dev/pts/1 : CLI : 'sh logging logfile list'
#sh logging cli logfile ipi match-pattern root
2017 Mar 01 16:30:59 :  : User root@/dev/pts/1 : CLI : 'exit'
2017 Mar 01 16:31:06 :  : User root@/dev/pts/1 : CLI : 'sh logging logfile list'
#show logging cli last 2
2017 Mar 1 16:34:26.302 :  : User root@/dev/pts/1 : CLI : 'sh logging info'
2017 Mar 1 16:34:37.317 :  : User root@/dev/pts/1 : CLI : 'sh logging cli last 2'
#show logging logfile list
file1
file2