proc/stat CPU Utilization Decoder
Paste two captures of /proc/stat and see how the time between them was spent on each CPU: busy, user, system, I/O wait, steal and idle, plus the all-CPU average and the length of the sample window.
Per-CPU time breakdown
| CPU | Busy (%) | User (%) | System (%) | I/O wait (%) | Steal (%) | Idle (%) |
|---|
Two samples are required: the counters in /proc/stat are totals since boot, so only the difference between two reads says what the machine did in between. Blank lines, comments and every line that does not start with cpu followed by nothing or a CPU number are ignored. Each cpu line is read as four to ten whole-number counters in the documented order: user, nice, system, idle, iowait, irq, softirq, steal, guest and guest_nice. A counter that went backwards is clamped to zero, because the kernel may lower iowait, and the page says how many were clamped. For each CPU, total is the sum of the first eight counters, idle is the idle plus iowait difference, and busy is total minus idle; user, nice, system, irq, softirq and steal therefore add up to busy, and time waiting on I/O is counted as idle rather than busy. Guest time is reported under user and nice and is not added to the total a second time. Every share is that difference divided by the CPU's total difference, rounded half up to one decimal, and idle is the exact complement of busy so the two always add to 100. The sample window is the all-CPU difference divided by 100 ticks per second and by the number of CPUs, which assumes the usual USER_HZ of 100 and a CPU list that did not change between the reads; it is an estimate, not a clock reading. Without the aggregate cpu line the all-CPU row is the sum of the per-CPU differences; without cpuN lines no per-CPU row or window is shown. Everything runs in your browser on the text you paste: nothing is read from the host, sent, stored or uploaded, and nothing here is a diagnosis of the machine.