Networking NVIDIA NVOS User Manual for InfiniBand Switches

Logging Commands

nv show system log


nv show system log
nv show system log file [<file-name>]
nv show system log file follow
nv show system log file list

Shows the system log files and the log configuration, or opens a log file.

Syntax Description


log

Shows the log files, the component log levels, and the log rotation settings.

file

Opens the current log file (syslog) in the less viewer.

file-name

The log file to open; for example, syslog.1.

follow

Shows the last lines of the current log file, then shows new lines as they are written (like tail -F). Press Ctrl+C to stop.

list

Lists the available log 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

admin@nvos:~$ nv show system log
              operational   applied
------------  ------------  ----------------
[file]        syslog
[file]        syslog.1
[file]        syslog.2.gz
[component]                 nvue
[component]                 orchagent
[component]                 portsyncd
[component]                 sai_api_port
[component]                 sai_api_switch
[component]                 symmetry-manager
[component]                 syncd
rotation
  frequency                 daily
  max-number                20
  size                      10.0

admin@nvos:~$ nv show system log file follow
May 31 15:59:15.041937 nvos INFO pmon#sensord:   PSU-1(L) Temp 3: 36.2 C (min = -0.5 C, max = 60.0 C)
May 31 16:00:01.312936 nvos INFO core_cleanup.py: Cleaning up core files
May 31 16:00:01.313062 nvos INFO core_cleanup.py: Finished cleaning up core files

admin@nvos:~$ nv show system log file list
File name     File path
------------  ---------------------
syslog        /var/log/syslog
syslog.1      /var/log/syslog.1
syslog.2.gz   /var/log/syslog.2.gz

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 <component-name> level <level>

Notes


nv show system log component


nv show system log component [<component-name>]
nv show system log component <component-name> file [<file-name>]
nv show system log component <component-name> file follow
nv show system log component <component-name> file list

Shows the log level of the system components, or the log files of a component.

Syntax Description

component-name

The component name; for example, nvue. If you omit it, the command shows all components.

file

Opens the current log file of the component in the less viewer.

file-name

The component log file to open.

follow

Shows the last lines of the current log file, then shows new lines as they are written (like tail -F). Press Ctrl+C to stop.

list

Lists the log files of the component.

Default

N/A

History

25.02.2002 
25.02.3000 Updated command output

Example

admin@nvos:~$ nv show system log component
Component         Level   Summary
----------------  ------  -------
nvue              info
orchagent         notice
portsyncd         notice
sai_api_port      notice
sai_api_switch    notice
symmetry-manager  info
syncd             notice

admin@nvos:~$ nv show system log component nvue file list
File name    File path
-----------  --------------------
nv-cli.log   /var/log/nv-cli.log
nvued.log    /var/log/nvued.log
nvued.log.1  /var/log/nvued.log.1

admin@nvos:~$ nv show system log component syncd
       operational  applied
-----  -----------  -------
level  notice       notice

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 <component-name> level <level>

Notes


nv show system log rotation


nv show system log rotation

Shows the log rotation settings.

Syntax Description

N/A


Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv show system log rotation
            operational  applied
----------  -----------  -------
frequency   daily        daily
max-number  20           20
size        10.0         10.0

REST API

GET https://<ip>/nvue_v1/system/log/rotation

Related Commands

nv set system log rotation

Notes


nv set/unset system log component


nv set system log component <component-name> level <level>
nv unset system log component <component-name> level

Sets the minimum priority level of the messages that a system component logs. The unset command restores the default (notice).

Syntax Description

component-name

The component name: nvue, orchagent, peer_telemetry, portsyncd, sai_api_port, sai_api_switch, symmetry-manager, or syncd.

level

The minimum priority level: debug, info, notice, warn, error, or critical.

Default

notice

History

25.02.2002 

Example

admin@nvos:~$ nv set system log component nvue level debug
admin@nvos:~$ nv unset system log component nvue level

REST API

PATCH https://<ip>/nvue_v1/system/log/component

Related Commands

nv show system log component

Notes

To see the component names, run the nv show system log component command.

nv set/unset system log rotation disk-percentage


nv set system log rotation disk-percentage <percentage>
nv unset system log rotation disk-percentage

Sets the log file size at which to rotate the file, as a percentage of the disk size. The unset command removes the setting.

Syntax Description

percentage

The percentage of the disk size: 0.001–100.

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv set system log rotation disk-percentage 10
admin@nvos:~$ nv unset system log rotation disk-percentage

REST API

PATCH https://<ip>/nvue_v1/system/log/rotation

Related Commands

nv show system log rotation

Notes

If you set the disk percentage, the switch uses it instead of the size setting.

nv set/unset system log rotation frequency


nv set system log rotation frequency <frequency>
nv unset system log rotation frequency

Sets how often to rotate the log files. The unset command restores the default (daily).

Syntax Description

frequency

The rotation frequency: daily, weekly, monthly, or yearly.

Default

daily

History

25.02.2002 

Example

admin@nvos:~$ nv set system log rotation frequency weekly
admin@nvos:~$ nv unset system log rotation frequency

REST API

PATCH https://<ip>/nvue_v1/system/log/rotation

Related Commands

nv show system log rotation

Notes


nv set/unset system log rotation max-number


nv set system log rotation max-number <count>
nv unset system log rotation max-number

Sets the maximum number of rotated log files to keep. The unset command restores the default (20).

Syntax Description

count

The number of rotated log files to keep before the oldest file is removed: 0–999999.

Default

20

History

25.02.2002 

Example

admin@nvos:~$ nv set system log rotation max-number 10
admin@nvos:~$ nv unset system log rotation max-number

REST API

PATCH https://<ip>/nvue_v1/system/log/rotation

Related Commands

nv show system log rotation

Notes


nv set/unset system log rotation size


nv set system log rotation size <mebibytes>
nv unset system log rotation size

Sets the log file size, in MiB, at which to rotate the file. The unset command restores the default (10 MiB).

Syntax Description

mebibytes

The file size in MiB: 0.001–3500.

Default

10

History

25.02.2002 

Example

admin@nvos:~$ nv set system log rotation size 100.123
admin@nvos:~$ nv unset system log rotation size

REST API

PATCH https://<ip>/nvue_v1/system/log/rotation

Related Commands

nv show system log rotation

Notes

The disk-percentage setting, if set, overrides this setting.

nv action rotate system log


nv action rotate system log

Rotates and compresses the system log files manually.

Syntax Description

N/A


Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv action rotate system log
Performing syslog log file rotation...
Log rotated successfully
Action succeeded

REST API

POST https://<ip>/nvue_v1/system/log/@rotate

Related Commands

nv show system log rotation

Notes


Last updated: