NVIDIA NVOS User Manual for InfiniBand Switches

Logging Commands

nv show system log


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


 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 sys 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 nvue level <level>

Notes


nv show system log component


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


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 nvue level <level>

Notes


nv show system log rotation


nv show system log rotation

Show log rotation criteria configuration.

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 

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

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

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/unset system log rotation disk-percentage


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

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/rotation

Related Commands

nv show system log rotation

Notes


nv set/unset system log rotation frequency


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

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/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

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

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/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

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

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/rotation

Related Commands

nv show system log rotation

Notes


nv action rotate system log


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

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

Related Commands

nv show system log rotation

Notes


Last updated: