Added total disk IO metric
This commit is contained in:
1 parent
b13b8dcbbb
commit
0d91f7d6a4
4 files changed
+11
-3
No files matched your search
@@ -637,6 +637,11 @@ use vars qw(%classes %cmds);
|
||||
name => 'bytes_written', type => 'Long',
|
||||
desc => 'Bytes Written',
|
||||
plat => 'LW'
|
||||
},
|
||||
{
|
||||
name => 'bytes_total', type => 'Long',
|
||||
desc => 'Bytes Total',
|
||||
plat => 'LW'
|
||||
}
|
||||
],
|
||||
ProcState => [
|
||||
|
||||
+2
-1
@@ -295,7 +295,8 @@ SIGAR_DECLARE(int) sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
typedef struct {
|
||||
sigar_uint64_t
|
||||
bytes_read,
|
||||
bytes_written;
|
||||
bytes_written,
|
||||
bytes_total;
|
||||
} sigar_proc_disk_io_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
|
||||
@@ -791,6 +791,7 @@ int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
|
||||
proc_disk_io->bytes_read = get_named_proc_token(buffer, "\nread_bytes");
|
||||
proc_disk_io->bytes_written = get_named_proc_token(buffer, "\nwrite_bytes");
|
||||
proc_disk_io->bytes_total = proc_disk_io->bytes_read + proc_disk_io->bytes_written;
|
||||
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
||||
@@ -1224,8 +1224,9 @@ SIGAR_DECLARE(int) sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
return status;
|
||||
}
|
||||
|
||||
proc_disk_io->bytes_read = pinfo->bytes_read;
|
||||
proc_disk_io->bytes_written = pinfo->bytes_written;
|
||||
proc_disk_io->bytes_read = pinfo->bytes_read;
|
||||
proc_disk_io->bytes_written = pinfo->bytes_written;
|
||||
proc_disk_io->bytes_total = proc_disk_io->bytes_read + proc_disk_io->bytes_written;
|
||||
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user