From fdaa15bd8d6df7dd4721ed70a913865b343a80c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Wed, 27 Jan 2021 15:11:48 +0100 Subject: Linux: overhaul io process fields - avoid UBSAN conversions - print N/A on no data (i.e. as unprivileged user) - fix rate calculation to show bytes (instead of a thousandth) - print bytes as human number (i.e. 8MB) instead of 8388608 - stabilize sorting by adjusting NAN values to very tiny negative number --- linux/LinuxProcess.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'linux/LinuxProcess.h') diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h index 2e9a9d13..03103c36 100644 --- a/linux/LinuxProcess.h +++ b/linux/LinuxProcess.h @@ -81,15 +81,31 @@ typedef struct LinuxProcess_ { long m_drs; long m_lrs; long m_dt; + + /* Data read (in kilobytes) */ unsigned long long io_rchar; + + /* Data written (in kilobytes) */ unsigned long long io_wchar; + + /* Number of read(2) syscalls */ unsigned long long io_syscr; + + /* Number of write(2) syscalls */ unsigned long long io_syscw; + + /* Storage data read (in kilobytes) */ unsigned long long io_read_bytes; + + /* Storage data written (in kilobytes) */ unsigned long long io_write_bytes; + + /* Storgae data cancelled (in kilobytes) */ unsigned long long io_cancelled_write_bytes; - unsigned long long io_rate_read_time; - unsigned long long io_rate_write_time; + + /* Point in time of last io scan (in seconds elapsed since the Epoch) */ + unsigned long long io_last_scan_time; + double io_rate_read_bps; double io_rate_write_bps; #ifdef HAVE_OPENVZ -- cgit v1.2.3