mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-29 16:50:20 +12:00
per process IO stats
This commit is contained in:
parent
c8b50ed488
commit
f98606c6db
|
@ -953,7 +953,6 @@ namespace Proc {
|
|||
}
|
||||
|
||||
//? Expand process status from single char to explanative string
|
||||
Logger::debug("pid " + std::to_string(pid) + string(":") + std::to_string(detailed.entry.state));
|
||||
detailed.status = get_status(detailed.entry.state);
|
||||
|
||||
if (detailed.memory.empty()) {
|
||||
|
@ -966,6 +965,13 @@ namespace Proc {
|
|||
}
|
||||
|
||||
while (cmp_greater(detailed.mem_bytes.size(), width)) detailed.mem_bytes.pop_front();
|
||||
|
||||
rusage_info_current rusage;
|
||||
if (proc_pid_rusage(pid, RUSAGE_INFO_CURRENT, (void **)&rusage) == 0) {
|
||||
// this fails for processes we don't own
|
||||
detailed.io_read = floating_humanizer(rusage.ri_diskio_bytesread);
|
||||
detailed.io_write = floating_humanizer(rusage.ri_diskio_byteswritten);
|
||||
}
|
||||
}
|
||||
|
||||
//* Collects and sorts process information from /proc
|
||||
|
|
Loading…
Reference in a new issue