disk i/o metrics for win2k
This commit is contained in:
parent
22452e99fc
commit
05aea8c508
|
@ -1,3 +1,7 @@
|
||||||
|
2005-04-27 Doug MacEachern <dougm@hyperic.net>
|
||||||
|
|
||||||
|
* Add disk i/o metrics for Windows 2000
|
||||||
|
|
||||||
2005-03-15 Doug MacEachern <dougm@hyperic.net>
|
2005-03-15 Doug MacEachern <dougm@hyperic.net>
|
||||||
|
|
||||||
* Change Sigar.getMountedFileSystemUsage to throw
|
* Change Sigar.getMountedFileSystemUsage to throw
|
||||||
|
|
|
@ -1528,6 +1528,18 @@ static int get_disk_metrics(sigar_t *sigar,
|
||||||
|
|
||||||
SIGAR_W2A(name, drive, sizeof(drive));
|
SIGAR_W2A(name, drive, sizeof(drive));
|
||||||
|
|
||||||
|
if (sigar_isdigit(*name)) {
|
||||||
|
char *ptr = strchr(drive, ' '); /* 2000 Server "0 C:" */
|
||||||
|
|
||||||
|
if (ptr) {
|
||||||
|
++ptr;
|
||||||
|
SIGAR_SSTRCPY(drive, ptr);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* XXX NT is a number only "0", how to map? */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (strnEQ(drive, dirname, 2)) {
|
if (strnEQ(drive, dirname, 2)) {
|
||||||
fsusage->disk_reads = PERF_VAL(PERF_IX_DISK_READ);
|
fsusage->disk_reads = PERF_VAL(PERF_IX_DISK_READ);
|
||||||
fsusage->disk_writes = PERF_VAL(PERF_IX_DISK_WRITE);
|
fsusage->disk_writes = PERF_VAL(PERF_IX_DISK_WRITE);
|
||||||
|
|
Loading…
Reference in New Issue