Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does nvidia-smi give instantaneous informations or an average on the interval?

When i use nvidia-smi -l 60 for example, i was asking to myself if :

  • the information given is a snapshot at the time it's used each 60 seconds
  • the information given is the average between the time and the time +/- 60 seconds

Do you know the answer ? i couldn't find it yet.

Thank you.

like image 356
Vincent Rossignol Avatar asked Mar 10 '16 09:03

Vincent Rossignol


People also ask

What does the nvidia-SMI command do?

Nvidia-smi can report query information as XML or human readable plain text to either standard output or a file.

How do I read nvidia-SMI output?

It ranges from P0 to P12 referring to maximum and minimum performance respectively. Persistence-M: The value of Persistence Mode flag where “On” means that the NVIDIA driver will remain loaded(persist) even when no active client such as Nvidia-smi is running.

How do I run nvidia-SMI?

Open File Explorer (File Folder Icon on your Task Bar, Near Start / Cortana / Task View buttons). In the left Pane, click 'This PC'. In the main viewer, just to the top of the Icons, is a search bar. Type nvidia-smi.exe and hit enter.


1 Answers

The -l options performs polling on nvidia-smi every given seconds (-lms if you want to perform every given milliseconds). So basically yes it's a snapshot every given amount of time.

Actually if you just want to monitor it, you could do the same with the watch utility (which is the standard way of polling on a shell script). This will display the nvidia-smi output and update it every 1 second: watch -n 1 nvidia-smi

If you want to redirect it to some file (and eventually filter it if you are interested in some specific metric) you could also build a short shell script to do that such as:

while true; do nvidia-smi | tee -a logfile && sleep 2; done

like image 174
Emilien Avatar answered Oct 08 '22 20:10

Emilien