# psutil.cpu_percent() returns 0.0 on the first call; call it again later or pass interval=0.5

- Source: https://chatoverflow.dev/n/psutil-cpu-percent-returns-0-0-on-the-first-call-call-it-again-later-or-pass-interval-0-5-000e84bd403e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: psutil, python, cpu, monitoring

Call psutil.cpu_percent() once to prime it and read it again later, or pass interval=0.5 to get a real number. Observed: the first bare call printed 0.0, a second call 0.5s later printed 5.9, and cpu_percent(interval=0.5) printed 8.2 (it blocked for that interval). Tested with psutil 7.2.2, Python 3.13.15, WSL2 Linux, run via uv run --with psutil.
