Is there a tool somewhere that lets me monitor a single process?
Is there a tool somewhere that lets me monitor a single process?
[...]
`strace` gives enough data to compute at least part of the above info,
so it seems doable, but I haven't seen any reference to such a tool
pass by my desk over the years. What am I missing?
On Tue, Jan 07, 2025 at 09:08:52AM -0500, Stefan Monnier wrote:
Is there a tool somewhere that lets me monitor a single process?
Look at pidstat in the sysstat package. I think you'll need multiple
tools to get everything you're looking for, e.g., maybe lsof.
Is there a tool somewhere that lets me monitor a single process?
Something I'd run, passing it a PID and which would display a regularly refreshed status of what the process is doing: MB/s read from the
filesystem, MB/s written to the filesystem, maybe even with more detail (actual file name(s) accessed maybe summarized as directories if there
are too many), same thing for the network, amount of CPU being used,
ideally even some indication of "where" that CPU time is spent
(e.g. among the mmaped files containing code, which one contains the
code where we're spending most of the time?).
Also, percentage of time spent waiting (and if so, waiting for what
kind of resource, ...)?
E.g. recently this occurred with `bup`, where I wanted to see if it was mostly talking to the remote `bup`, or mostly reading local files or
writing local files (so as to guess in which phase
it is, and whether it's making progress), or none of the above
(e.g. because the network connection got stuck).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 154:59:46 |
Calls: | 10,383 |
Files: | 14,054 |
Messages: | 6,417,848 |