7 ms·
Install atop and configure it to sample every second. I can't count the number of times this has helped solve a mysterious behavior. Atop is king.
by tie_ 4y ago
Install atop and configure it to sample every second.
I can't count the number of times this has helped solve a mysterious behavior. Atop is king.
- geocrasher 4y agoYes, atop is great for this! There's also "sar" (system activity report) which can do similar things. Both are quite helpful.
- jeffbee 4y agoIt's great but it's very expensive so be aware that if you are down to the level of caring about things in the single-digit percentages of your budget, something like atop once per second could easily consume that amount of resources. A lot of these stats are really not cheap at all. E.g. you may find a substantial difference in the amount of CPU time needed to produce /proc/pid/stat as opposed to /proc/pid/statm. And some of the system-wide stats are even worse.
- winrid 4y agoBe careful running atop with the -R flag on machines that create lots of short lived threads or do lots of IO, like many databases.