From 323d7e73aa1cc13b3a0870530e8fbd27102259ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Mon, 26 Apr 2021 17:57:47 +0200 Subject: Linux: update IO fields - fix header width of IO_READ_RATE - save data in bytes (not kilobytes) to better compute rate - fix rate data: multiply with 1000 to compensate time difference in milliseconds - rename unit less variable now into realtimeMs - use Process_printBytes(..., data * pageSize, ...) instead of Process_printKBytes(..., data * pageSizeKB, ...) to avoid wrapper --- linux/LinuxProcess.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'linux/LinuxProcess.h') diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h index 622189b2..3813aa18 100644 --- a/linux/LinuxProcess.h +++ b/linux/LinuxProcess.h @@ -82,10 +82,10 @@ typedef struct LinuxProcess_ { long m_lrs; long m_dt; - /* Data read (in kilobytes) */ + /* Data read (in bytes) */ unsigned long long io_rchar; - /* Data written (in kilobytes) */ + /* Data written (in bytes) */ unsigned long long io_wchar; /* Number of read(2) syscalls */ @@ -94,20 +94,24 @@ typedef struct LinuxProcess_ { /* Number of write(2) syscalls */ unsigned long long io_syscw; - /* Storage data read (in kilobytes) */ + /* Storage data read (in bytes) */ unsigned long long io_read_bytes; - /* Storage data written (in kilobytes) */ + /* Storage data written (in bytes) */ unsigned long long io_write_bytes; - /* Storage data cancelled (in kilobytes) */ + /* Storage data cancelled (in bytes) */ unsigned long long io_cancelled_write_bytes; - /* Point in time of last io scan (in seconds elapsed since the Epoch) */ - unsigned long long io_last_scan_time; + /* Point in time of last io scan (in milliseconds elapsed since the Epoch) */ + unsigned long long io_last_scan_time_ms; + /* Storage data read (in bytes per second) */ double io_rate_read_bps; + + /* Storage data written (in bytes per second) */ double io_rate_write_bps; + #ifdef HAVE_OPENVZ char* ctid; pid_t vpid; -- cgit v1.2.3