From aee1d82fae3573e03c4dd7b206c04c7e20f82f33 Mon Sep 17 00:00:00 2001 From: nira11 Date: Wed, 14 Aug 2013 10:20:58 +0000 Subject: [PATCH] disk io hpux --- src/os/hpux/hpux_sigar.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/os/hpux/hpux_sigar.c b/src/os/hpux/hpux_sigar.c index d362b04e..e2ec906a 100644 --- a/src/os/hpux/hpux_sigar.c +++ b/src/os/hpux/hpux_sigar.c @@ -310,7 +310,19 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid, int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid, sigar_proc_disk_io_t *proc_disk_io) { - return SIGAR_ENOTIMPL; + + int status = sigar_pstat_getproc(sigar, pid); + struct pst_status *pinfo = sigar->pinfo; + + 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; + + + return SIGAR_OK; }