logmgr help
Provides the details about the usage,
syntax, and examples of Log Manager commands.
Modes
Privileged EXEC mode
Examples
The following example shows the usage and examples of Log Manager commands.
device# logmgr help
List Logs ========================================================
Syntax: logmgr list <modules> <submodules> <severities> <units>
If no units are specified, will list local logs
Examples:
'logmgr list all all all all' - display all logs on all units
'logmgr list all all all' - display all logs on local unit
Note: 'high' includes err,crit,alert,emerg. 'low' includes debug,info,notice,warning
Fetch Logs =======================================================
Syntax: logmgr fetch <modules> <submodules> <severities> <units>
All parameters are required. Can clear fetched logs with 'logmgr clear-fetched-logs'
Examples:
'logmgr fetch all all all all' - fetch all logs from all units
'logmgr fetch infra cfg_sync_lib,cfg_sync_proc, info 1,3' - fetch subset of logs from units 1 and 3
Note: Can fetch from local unit to get a snapshot of the logs at that point in time
Note: Logs of severity err,crit,alert,emerg will be fetched together. Same for debug,info,notice,warning.
Show Logs ========================================================
Syntax: show log debug <modules> <submodules> <severities> <units> <start> <end> <txn_id>
Note: There may be a delay depending on the size of the subset of logs specified
If 'fetch' has been called then the fetched logs will be displayed. Otherwise the local logs will be displayed.
Examples with no fetched logs:
'show log debug all all all' - will display all local logs (module, submodle, severity are required)
'show log debug infra cfg_sync_proc,qos info,err' - display subset of local logs
'show log debug infra cfg_sync_proc,qos err+' - display subset of logs with severities err or higher
'show log debug all all all Apr_6_22:44:55:00 Apr_6_22:49:00 123456789' - display logs between those two times and with the txn id
'show log debug all all all end=Apr_6_22:49:00 txn_id=123456789' - display logs before the end time and with the txn id
Examples with fetched logs: (uses Fetch CLI arguments by default. Can provide new arguments as well)
'show log debug' - display the fetched logs with the same parameters passed to the Fetch CLI
'show log debug unit=2' - only display the fetched logs from unit 2
'show log debug module=infra submodule=cfg_sync_proc' - display fetched logs but with newly specified module/submodule
Monitor Logs ========================================================
Syntax: logmgr monitor <module>:<submodule1,...,submoduleN>:<severity1,...,severityN>
Note: Logs of severity err,crit,alert,emerg will be shown together. Same for debug,info,notice,warning.
Example:
'logmgr monitor infra:cfg_sync_proc,qos:info,err nms:restconf:notice
Upload Logs ========================================================
Note: This uploads Fetched logs. Fetch before uploading
Note: For TFTP, make sure the file exists already with correct permissions to be able to write to it
History
| Release version | Command history |
|---|---|
| 09.0.00 | This command was introduced. |