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

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


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