[SIGAR-7] Convert sectors to bytes in Linux file system read/write bytes metrics
This commit is contained in:
parent
954b01b441
commit
774f110915
|
@ -1,3 +1,8 @@
|
|||
2006-06-21 Doug MacEachern <dougm@hyperic.com>
|
||||
|
||||
* [SIGAR-7] Convert sectors to bytes in Linux file system
|
||||
read/write bytes metrics
|
||||
|
||||
2006-06-09 Doug MacEachern <dougm@hyperic.com>
|
||||
|
||||
* [SIGAR-6] Use rounding for mem.ram on Linux rather than
|
||||
|
|
|
@ -1317,6 +1317,10 @@ static int get_iostat_proc_dstat(sigar_t *sigar,
|
|||
fsusage->disk_read_bytes = rsect;
|
||||
fsusage->disk_write_bytes = wsect;
|
||||
|
||||
/* convert sectors to bytes (512 is fixed size in 2.6 kernels) */
|
||||
fsusage->disk_read_bytes *= 512;
|
||||
fsusage->disk_write_bytes *= 512;
|
||||
|
||||
fclose(fp);
|
||||
return status;
|
||||
}
|
||||
|
@ -1369,6 +1373,10 @@ static int get_iostat_procp(sigar_t *sigar,
|
|||
fsusage->disk_queue = sigar_strtoul(ptr); /* aveq */
|
||||
fsusage->disk_queue /= 1000;
|
||||
|
||||
/* convert sectors to bytes (512 is fixed size in 2.6 kernels) */
|
||||
fsusage->disk_read_bytes *= 512;
|
||||
fsusage->disk_write_bytes *= 512;
|
||||
|
||||
fclose(fp);
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue