Prefer to read without ads? Become a member — from $10/month — and support the work. Already a member? Log in to read ad-free on this device.

4.6 nvidia-smi

nvidia-smi, the NVIDIA System Management Interface, is used to manage the environment in which Tesla-class NVIDIA GPU boards operate. It can report GPU status and control aspects of GPU execution, such as whether ECC is enabled and how many CUDA contexts can be created on a given GPU.

When nvidia-smi is invoked with the —help (-h) option, it generates a usage message that, besides giving a brief description of its purpose and command-line options, also gives a list of supported products. Tesla- and Quadro-branded GPUs are fully supported, while GeForce-branded GPUs get limited support.

Many of the GPU boards supported by nvidia-smi include multiple GPUs; nvidia-smi refers to these boards as units. Some operations, such as toggling the status of an LED (light emitting diode), are available only on a per-unit basis.

nvidia-smi has several modes of operation. If no other command line parameters are given, it lists a summary of available GPUs that can be refined by the command line options of Table 4-11. Otherwise, the other command line options that are available include the following:

Option Description
--list-gpus (-L) Display a list of available GPUs.
--id=<GPU> (-i) Target a specific GPU.
--filename=<name> (-f) Log to a given file, rather than to stdout.
--loop=<interval> (-l) Probe at specified interval (in seconds) until Ctrl+C.

Table 4-11. nvidia-smi List options.

Option Description
--query (-q) Display GPU or unit information.
--unit (-u) Show unit attributes, rather than GPU attributes.
--id=<GPU> (-i) Target a specific GPU.
--filename=<name> (-f) Log to a given file, rather than to stdout.
--xml-format (-x) Produce XML output.
--display=<list> (-d) Display only selected information. The following options may be selected with a comma-delimited list: MEMORY, UTILIZATION, ECC, TEMPERATURE, POWER, CLOCK, COMPUTER, PIDS, PERFORMANCE, SUPPORTED_CLOCKS
--loop=<interval> (-l) Probe at specified interval (in seconds) until Ctrl+C.

Table 4-12. nvidia-smi Query options.

Option Description
--application-clocks=<clocks> (-ac) Specifies GPU clock speeds as a tuple: <memory,graphics> (e.g., 2000,800)
--compute-mode=<mode> (-c) Set compute mode: 0/DEFAULT, 1/EXCLUSIVE_THREAD, 2/PROHIBITED, or 3/EXCLUSIVE_PROCESS
--driver-model=<model> (-dm) Windows only: Enable or disable TCC (Tesla Compute Cluster) driver: 0/WDDM, 1/TCC. See also --force-driver-model (-fdm)
--ecc-config=<config> (-e) Set ECC mode: 0/DISABLED or 1/ENABLED.
--force-driver-model=<model> (-fdm) Windows only: Enable or disable TCC (Tesla Compute Cluster) driver: 0/WDDM, 1/TCC. This option causes TCC to be enabled even if a display is connected to the GPU, which otherwise would cause nvidia-smi to report an error.
--gom=<mode> Set GPU operation mode: 0/ALL_ON, 1/COMPUTE, 2/LOW_DP
--gpu-reset (-r) Trigger secondary bus reset of GPU. This operation can be used to reset GPU hardware state when a machine reboot might otherwise be required. Requires --id.
--id=<GPU> (-i) Target a specific GPU.
--persistence-mode=<mode> (-pm) Set persistence mode: 0/DISABLED or 1/ENABLED.
--power-limit (-pl) Specifies maximum power management limit in watts.
--reset-application-clocks (-rac) Reset the application clocks to the default.
--reset-ecc-errors=<type> (-p) Reset ECC error counts: 0/VOLATILE or 1/AGGREGATE.

Table 4-13. nvidia-smi Device Modification options.