Logging Commands
nv show system log {file {file-name} {follow} {list}} Displays the log file | ||
Syntax Description | log | Displays the log file in interactive mode , similar to LINUX “less” utility |
file | Displays the contents of the current log | |
file-name | Displays an archived log file | |
follow | Displays the last few lines of the current log file and then continues to display new lines as they come in until the user hits Ctrl+C, similar to LINUX “tail” utility. | |
list | Displays a list of all the available syslog files | |
Default | N/A | |
History | 25.02.2002 25.02.3000: Changed "nv show system log files" to "nv show system log file", removed debug-log option, changed output of "nv show system log" to also display log configurations, added "nv show system log file list" | |
Example |
| |
REST API | GET https://<ip>/nvue_v1/system/log GET https://<ip>/nvue_v1/system/log/file GET https://<ip>/nvue_v1/system/log/file/{file-name} | |
Related Commands | nv set system log component nvue level <level> | |
Notes |
nv show system log component <component-name> {file {file-name} {follow} {list}} Displays the log configuration of all the system components. | ||
Syntax Description | component-name | Displays the log configuration of specific system component |
file | Displays the contents of the current log | |
file-name | Displays an archived log file | |
follow | Displays the last few lines of the current log file and then continues to display new lines as they come in until the user hits Ctrl+C, similar to LINUX “tail” utility. | |
list | Displays a list of all the available syslog files | |
Default | N/A | |
History | 25.02.2002 25.02.3000: Updated command output | |
Example |
| |
REST API | GET https://<ip>/nvue_v1/system/log/component GET https://<ip>/nvue_v1/system/log/component/{component-name} | |
Related Commands | nv set system log component nvue level <level> | |
Notes |
nv show system log rotation Show log rotation criteria configuration. | ||
Syntax Description | N/A | |
Default | N/A | |
History | 25.02.2002 | |
Example |
| |
REST API | GET https://<ip>/nvue_v1/system/log/rotation | |
Related Commands | nv set system log rotation | |
Notes |
nv set system log component <component-name> level <level> nv unset system log component <component-name> level Set/unset the system component minimum priority level of messages to log | ||
Syntax Description | component-name | The system component name: nvue, orchagent, portsyncd, sai_api_port, sai_api_switch, syncd |
level | The minimum priority level of messages to log: critical, debug, error, info, notice, warn | |
Default | notice | |
History | 25.02.2002 | |
Example |
| |
REST API | PATCH https://<ip>/nvue_v1/system/log/component | |
Related Commands | nv show system log component nv unset system log component level | |
Notes | To get component-name run "nv show system log component" |
nv set system log rotation disk-percentage <percentage> nv unset system log rotation disk-percentage Set/unset the size of the log file to rotate based on disk size percentage. | ||
Syntax Description | percentage | Percentage value: 0.001–100 |
Default | N/A | |
History | 25.02.2002 | |
Example |
| |
REST API | PATCH https://<ip>/nvue_v1/system/rotation | |
Related Commands | nv show system log rotation | |
Notes |
nv set system log rotation frequency <frequency> nv unset system log rotation frequency Set/unset the frequency of the file rotation. | ||
Syntax Description | frequency | Rotation frequency: daily, weekly, monthly, yearly |
Default | daily | |
History | 25.02.2002 | |
Example |
| |
REST API | PATCH https://<ip>/nvue_v1/system/rotation | |
Related Commands | nv show system log rotation | |
Notes |
nv set system log rotation max-number <count> nv unset system log rotation max-number Set/unset the max number of file rotations. | ||
Syntax Description | count | Number of file rotations before being removed: 0–999999 |
Default | 20 | |
History | 25.02.2002 | |
Example |
| |
REST API | PATCH https://<ip>/nvue_v1/system/rotation | |
Related Commands | nv show system log rotation | |
Notes |
nv set system log rotation size <mebibytes> nv unset system log rotation size Set the size of the file to be rotated. | ||
Syntax Description | mebibytes | The size threshold for a file to be rotated: 0.001–3500 MiB |
Default | 10 | |
History | 25.02.2002 | |
Example |
| |
REST API | PATCH https://<ip>/nvue_v1/system/rotation | |
Related Commands | nv show system log rotation | |
Notes |
nv set system syslog trap <severity> nv unset system syslog trap Set the minimum log level to send the logs to remote servers. The unset form of that command resets trap to default. | ||
Syntax Description | severity | debug | info | notice | warn | error | critical | none |
Default | Notice | |
History | 25.02.2002 | |
Example |
| |
REST API | PATCH https://<ip>/nvue_v1/system/syslog/trap | |
Related Commands | nv show system log rotation | |
Notes |
nv action rotate system log Force log file rotation. Action to trigger file rotation manually. | ||
Syntax Description | N/A | |
Default | N/A | |
History | 25.02.2002 | |
Example |
| |
REST API | POST https://<ip>/nvue_v1/system | |
Related Commands | nv show system log rotation | |
Notes |