Skip to content

How-ToGPU

How to Log GPU Usage, Temperature and Power With nvidia-smi

How to log an NVIDIA graphics card's utilisation, VRAM, temperature and power draw to a CSV file with nvidia-smi's --query-gpu, --format=csv, -l and -f options, plus the dmon alternative, based on NVIDIA's documentation.

By , Systems & Technical Editor

3 min read

How to Log GPU Usage, Temperature and Power With nvidia-smi

Watching a graphics card's load in Task Manager is fine for a quick look, but if you want a record of what happened during a long game session, a render or a local AI job, you need a log. NVIDIA's command-line tool, nvidia-smi, comes with the driver on Windows and Linux and can write readings to a CSV file you can open in Excel. This guide uses NVIDIA's nvidia-smi documentation. That most GeForce cards get more limited information than its workstation and data-centre GPUs.

Step 1: Open a terminal

On Windows, open Terminal or Command Prompt; on Linux, open a shell. Type nvidia-smi and press Enter. You should see a summary of each NVIDIA GPU. If the command isn't found, update your graphics driver first.

Step 2: Choose what to record

The --query-gpu= option takes a comma-separated list of properties. Run nvidia-smi --help-query-gpu to see every property your driver supports. Common ones include:

Property

What it records

timestamp

Date and time of the reading

utilization.gpu

GPU load in %

memory.used

VRAM in use

temperature.gpu

GPU temperature in C

power.draw

Board power draw in W

Check the help output on your system, as property names can vary between driver versions.

Step 3: Add the format and loop options

NVIDIA's documentation says --format=csv is mandatory with selective queries, and you can add noheader to skip the column headings and nounits to drop the units. -l SEC (or --loop=SEC) repeats the reading every few seconds until you press Ctrl+C; without a number it defaults to 5 seconds. For faster sampling, -lms sets the interval in milliseconds.

Putting it together:

nvidia-smi --query-gpu=timestamp,utilization.gpu,memory.used,temperature.gpu,power.draw --format=csv -l 1

Step 4: Save to a file

Add -f (or --filename=) to write the readings to a file instead of the screen, for example -f gpu-log.csv. NVIDIA warns that the file is overwritten each time, so use a new name for each run. You can also redirect the output with > gpu-log.csv. Open the CSV in Excel or Google Sheets to chart it.

Step 5: Pick one GPU on a multi-GPU PC

Add -i followed by the GPU's index, UUID or PCI bus ID. NVIDIA recommends the UUID or bus ID for consistency, because index order isn't guaranteed to stay the same between reboots. nvidia-smi -L lists your GPUs with their UUIDs.

The quick alternative: dmon

nvidia-smi dmon prints one line of readings per second, including power, temperature, clocks and utilisation, until you press Ctrl+C. NVIDIA's documentation notes it runs under bare-metal 64-bit Linux and supports only limited GeForce products, so the query method above is the safer choice on Windows gaming PCs.

What to do with the log

A log helps you see whether a card is hitting its power limit or getting hot during long loads. If it is, see our guide to setting a GPU power limit with nvidia-smi, or our GPU temperature guide if you're worried about heat. For local AI, compare memory.used with your card's VRAM to see how close a model is to the limit.

Our verdict

nvidia-smi --query-gpu=... --format=csv -l 1 -f log.csv gives you a timestamped CSV of your card's load, VRAM, temperature and power with nothing extra to install. Check --help-query-gpu for the exact property names your driver supports.

The bottom line

`nvidia-smi --query-gpu=... --format=csv -l 1 -f log.csv` gives you a timestamped CSV of your card's load, VRAM, temperature and power with nothing extra to install. Check `--help-query-gpu` for the exact property names your driver supports.

Sources

  1. 01NVIDIA, nvidia-smi documentation (selective query, format, loop, filename and dmon options)

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Fix Slow Token Generation in llama.cpp

How-To

How to Fix Slow Token Generation in llama.cpp

How to fix slow llama.cpp text generation by confirming GPU offload with -ngl and setting -t to your physical core count or lower, with the llama.cpp developers' own example showing the effect of each setting.

Marcus Thorne2 min

How to Run Multiple Models at Once in Ollama

How-To

How to Run Multiple Models at Once in Ollama

How Ollama keeps several models loaded and handles parallel requests, with the defaults for OLLAMA_MAX_LOADED_MODELS, OLLAMA_NUM_PARALLEL and OLLAMA_MAX_QUEUE, how to change them, and how Ollama places models across multiple GPUs.

Marcus Thorne3 min

How to Check a Driver Version in Windows 11

How-To

How to Check a Driver Version in Windows 11

How to check any device's driver version in Windows 11 through Device Manager's Driver tab, and how to see an NVIDIA graphics driver's version by typing nvidia-smi in Terminal.

Marcus Thorne2 min