init new disk fields
This commit is contained in:
parent
fe14eb78f0
commit
aa3a6a201d
|
@ -1644,6 +1644,10 @@ static int get_perfstat_disk_metrics(sigar_t *sigar,
|
||||||
fsusage->disk_reads = disk.rblks;
|
fsusage->disk_reads = disk.rblks;
|
||||||
fsusage->disk_writes = disk.wblks;
|
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;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1679,6 +1683,9 @@ static int get_disk_metrics(sigar_t *sigar,
|
||||||
if (strEQ(diskio->name, dkstat.diskname)) {
|
if (strEQ(diskio->name, dkstat.diskname)) {
|
||||||
fsusage->disk_reads = dkstat.dk_rblks;
|
fsusage->disk_reads = dkstat.dk_rblks;
|
||||||
fsusage->disk_writes = dkstat.dk_wblks;
|
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;
|
status = SIGAR_OK;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1710,6 +1717,9 @@ static int get_disk_metrics(sigar_t *sigar,
|
||||||
if (strEQ(diskio->name, dkstat.diskname)) {
|
if (strEQ(diskio->name, dkstat.diskname)) {
|
||||||
fsusage->disk_reads = dkstat.dk_rblks;
|
fsusage->disk_reads = dkstat.dk_rblks;
|
||||||
fsusage->disk_writes = dkstat.dk_wblks;
|
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;
|
diskio->addr = (long)dp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1083,6 +1083,9 @@ int sigar_file_system_usage_get(sigar_t *sigar,
|
||||||
#else
|
#else
|
||||||
fsusage->disk_reads = buf.f_syncreads + buf.f_asyncreads;
|
fsusage->disk_reads = buf.f_syncreads + buf.f_asyncreads;
|
||||||
fsusage->disk_writes = buf.f_syncwrites + buf.f_asyncwrites;
|
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
|
#endif
|
||||||
|
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
|
|
|
@ -627,6 +627,9 @@ int sigar_file_system_usage_get(sigar_t *sigar,
|
||||||
if (retval == 1) {
|
if (retval == 1) {
|
||||||
fsusage->disk_reads = lv.psl_rxfer;
|
fsusage->disk_reads = lv.psl_rxfer;
|
||||||
fsusage->disk_writes = lv.psl_wxfer;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1076,6 +1076,10 @@ static int get_iostat_sys(sigar_t *sigar,
|
||||||
ptr = sigar_skip_token(ptr);
|
ptr = sigar_skip_token(ptr);
|
||||||
fsusage->disk_writes = sigar_strtoul(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;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1112,6 +1116,9 @@ static int get_iostat_procp(sigar_t *sigar,
|
||||||
/* rmerge, rsect, ruse */
|
/* rmerge, rsect, ruse */
|
||||||
ptr = sigar_skip_multiple_token(ptr, 3);
|
ptr = sigar_skip_multiple_token(ptr, 3);
|
||||||
fsusage->disk_writes = sigar_strtoul(ptr); /* wio */
|
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);
|
fclose(fp);
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1320,6 +1320,10 @@ static int fs_kstat_read(sigar_t *sigar,
|
||||||
kstat_read(sigar->kc, ksp, &io);
|
kstat_read(sigar->kc, ksp, &io);
|
||||||
fsusage->disk_reads = io.reads;
|
fsusage->disk_reads = io.reads;
|
||||||
fsusage->disk_writes = io.writes;
|
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;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue