init new disk fields

This commit is contained in:
Doug MacEachern 2005-04-07 01:28:07 +00:00
parent fe14eb78f0
commit aa3a6a201d
5 changed files with 27 additions and 0 deletions

View File

@ -1644,6 +1644,10 @@ static int get_perfstat_disk_metrics(sigar_t *sigar,
fsusage->disk_reads = disk.rblks;
fsusage->disk_writes = disk.wblks;
fsusage->disk_read_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
return SIGAR_OK;
}
@ -1679,6 +1683,9 @@ static int get_disk_metrics(sigar_t *sigar,
if (strEQ(diskio->name, dkstat.diskname)) {
fsusage->disk_reads = dkstat.dk_rblks;
fsusage->disk_writes = dkstat.dk_wblks;
fsusage->disk_read_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
status = SIGAR_OK;
}
else {
@ -1710,6 +1717,9 @@ static int get_disk_metrics(sigar_t *sigar,
if (strEQ(diskio->name, dkstat.diskname)) {
fsusage->disk_reads = dkstat.dk_rblks;
fsusage->disk_writes = dkstat.dk_wblks;
fsusage->disk_read_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
diskio->addr = (long)dp;
break;
}

View File

@ -1083,6 +1083,9 @@ int sigar_file_system_usage_get(sigar_t *sigar,
#else
fsusage->disk_reads = buf.f_syncreads + buf.f_asyncreads;
fsusage->disk_writes = buf.f_syncwrites + buf.f_asyncwrites;
fsusage->disk_read_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
#endif
return SIGAR_OK;

View File

@ -627,6 +627,9 @@ int sigar_file_system_usage_get(sigar_t *sigar,
if (retval == 1) {
fsusage->disk_reads = lv.psl_rxfer;
fsusage->disk_writes = lv.psl_wxfer;
fsusage->disk_read_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
}
}

View File

@ -1076,6 +1076,10 @@ static int get_iostat_sys(sigar_t *sigar,
ptr = sigar_skip_token(ptr);
fsusage->disk_writes = sigar_strtoul(ptr);
fsusage->disk_read_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
return SIGAR_OK;
}
@ -1112,6 +1116,9 @@ static int get_iostat_procp(sigar_t *sigar,
/* rmerge, rsect, ruse */
ptr = sigar_skip_multiple_token(ptr, 3);
fsusage->disk_writes = sigar_strtoul(ptr); /* wio */
fsusage->disk_read_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
fclose(fp);
return SIGAR_OK;
}

View File

@ -1320,6 +1320,10 @@ static int fs_kstat_read(sigar_t *sigar,
kstat_read(sigar->kc, ksp, &io);
fsusage->disk_reads = io.reads;
fsusage->disk_writes = io.writes;
fsusage->disk_read_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
return SIGAR_OK;
}