sigar hpux - disk io fix

This commit is contained in:
nira11 2013-08-27 11:37:22 +00:00
parent 6508b09304
commit f2ba707d9f
3 changed files with 7 additions and 7 deletions

View File

@ -763,8 +763,8 @@ int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid,
if (status != SIGAR_OK) { if (status != SIGAR_OK) {
return status; return status;
} }
proc_disk_io->bytes_read = 0; proc_disk_io->bytes_read = SIGAR_FIELD_NOTIMPL;
proc_disk_io->bytes_written = 0; proc_disk_io->bytes_written = SIGAR_FIELD_NOTIMPL;
proc_disk_io->bytes_total = pinfo->pi_ioch; proc_disk_io->bytes_total = pinfo->pi_ioch;
return SIGAR_OK; return SIGAR_OK;

View File

@ -317,9 +317,9 @@ int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid,
if (status != SIGAR_OK) { if (status != SIGAR_OK) {
return status; return status;
} }
proc_disk_io->bytes_read = pinfo->pst_inblock; proc_disk_io->bytes_read = SIGAR_FIELD_NOTIMPL;
proc_disk_io->bytes_written = pinfo->pst_oublock; proc_disk_io->bytes_written = SIGAR_FIELD_NOTIMPL;
proc_disk_io->bytes_total = pinfo->pst_inblock + pinfo->pst_oublock; proc_disk_io->bytes_total = pinfo->pst_ioch;
return SIGAR_OK; return SIGAR_OK;

View File

@ -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) { if ((status = sigar_proc_usage_get(sigar, &usage, pid)) != SIGAR_OK) {
return status; return status;
} }
proc_disk_io->bytes_read = usage.pr_inblk; proc_disk_io->bytes_read = SIGAR_FIELD_NOTIMPL;
proc_disk_io->bytes_written = usage.pr_oublk; proc_disk_io->bytes_written = SIGAR_FIELD_NOTIMPL;
proc_disk_io->bytes_total = usage.pr_ioch; proc_disk_io->bytes_total = usage.pr_ioch;
return SIGAR_OK; return SIGAR_OK;