Sample and attribute CPU, memory and I O usage to individual processes and threads with a compact tool. 04.07.2026 | reading time: 2 min When a service slows, which process is responsible? `pidstat` answers that question by sampling kernel statistics for processes and threads so you can see who does the heavy lifting in real time; it ships in the sysstat package and works with a simple interval and count model. Real troubleshooting example Imagine a web backend with periodic CPU spikes; after installing the tool with `sudo apt install sysstat` run `pidstat -u -p ALL 1 5` to sample CPU every second five times and inspect output rows such as `12345 0.10 1.20 1.30` where the numbers represent PID, percent user, percent system and percent CPU total for that sample. Beyond CPU Do not stop at `-u`; add `-r` for memory stats, `-d` for I O activity, `-t` to include threads and `-C` to filter by command name, and remember that `pidstat` accepts a PID list with `-p` and sampling arguments like `interval` and `count`; run it as root when you need per thread I O details and redirect output to a file for later analysis. Tools that pair well `pidstat` shows per process trends; combine it with `top` or `htop` for live dashboards, use `ps` for one shot snapshots, and consult `iostat` and `vmstat` for system wide I O and memory perspectives when you need the bigger picture. Final step Start using `pidstat` in a controlled test, collect samples during a spike and correlate the PID output with application logs to find the culprit; continue deepening your Linux skills and consider exam preparation such as CompTIA Linux+ or LPIC-1 with intensive courses at bitsandbytes.academy to turn troubleshooting into certified expertise. Join Bits & Bytes Academy First class LINUX exam preparation. processes utilities troubleshooting scripting infrastructure Dieser Artikel wurde mithilfe von KI erstellt.