From f2ba707d9fe39108c30f980b3811b10aad5536a7 Mon Sep 17 00:00:00 2001 From: nira11 Date: Tue, 27 Aug 2013 11:37:22 +0000 Subject: [PATCH] sigar hpux - disk io fix --- src/os/aix/aix_sigar.c | 4 ++-- src/os/hpux/hpux_sigar.c | 6 +++--- src/os/solaris/solaris_sigar.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/os/aix/aix_sigar.c b/src/os/aix/aix_sigar.c index 2bc0d5bb..ca6d5935 100644 --- a/src/os/aix/aix_sigar.c +++ b/src/os/aix/aix_sigar.c @@ -763,8 +763,8 @@ int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid, if (status != SIGAR_OK) { return status; } - proc_disk_io->bytes_read = 0; - proc_disk_io->bytes_written = 0; + proc_disk_io->bytes_read = SIGAR_FIELD_NOTIMPL; + proc_disk_io->bytes_written = SIGAR_FIELD_NOTIMPL; proc_disk_io->bytes_total = pinfo->pi_ioch; return SIGAR_OK; diff --git a/src/os/hpux/hpux_sigar.c b/src/os/hpux/hpux_sigar.c index e2ec906a..0d5bbf92 100644 --- a/src/os/hpux/hpux_sigar.c +++ b/src/os/hpux/hpux_sigar.c @@ -317,9 +317,9 @@ int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid, if (status != SIGAR_OK) { return status; } - proc_disk_io->bytes_read = pinfo->pst_inblock; - proc_disk_io->bytes_written = pinfo->pst_oublock; - proc_disk_io->bytes_total = pinfo->pst_inblock + pinfo->pst_oublock; + proc_disk_io->bytes_read = SIGAR_FIELD_NOTIMPL; + proc_disk_io->bytes_written = SIGAR_FIELD_NOTIMPL; + proc_disk_io->bytes_total = pinfo->pst_ioch; return SIGAR_OK; diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index 5083eac7..35a9d7df 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -727,8 +727,8 @@ int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid, if ((status = sigar_proc_usage_get(sigar, &usage, pid)) != SIGAR_OK) { return status; } - proc_disk_io->bytes_read = usage.pr_inblk; - proc_disk_io->bytes_written = usage.pr_oublk; + proc_disk_io->bytes_read = SIGAR_FIELD_NOTIMPL; + proc_disk_io->bytes_written = SIGAR_FIELD_NOTIMPL; proc_disk_io->bytes_total = usage.pr_ioch; return SIGAR_OK;