add disk service_time field

This commit is contained in:
Doug MacEachern 2007-11-03 23:01:20 +00:00
parent 2b39b1228e
commit 382dcba038
2 changed files with 6 additions and 1 deletions

View File

@ -442,6 +442,8 @@ typedef struct {
sigar_uint64_t rtime; sigar_uint64_t rtime;
sigar_uint64_t wtime; sigar_uint64_t wtime;
sigar_uint64_t time; sigar_uint64_t time;
sigar_uint64_t snaptime;
double service_time;
} sigar_disk_usage_t; } sigar_disk_usage_t;
/* XXX for sigar_file_system_usage_t compat */ /* XXX for sigar_file_system_usage_t compat */
@ -450,6 +452,7 @@ typedef struct {
#define disk_write_bytes disk.write_bytes #define disk_write_bytes disk.write_bytes
#define disk_read_bytes disk.read_bytes #define disk_read_bytes disk.read_bytes
#define disk_queue disk.queue #define disk_queue disk.queue
#define disk_service_time disk.service_time
typedef struct { typedef struct {
sigar_disk_usage_t disk; sigar_disk_usage_t disk;

View File

@ -312,7 +312,9 @@ int sigar_group_name_get(sigar_t *sigar, int gid, char *buf, int buflen);
#define SIGAR_DISK_STATS_INIT(disk) \ #define SIGAR_DISK_STATS_INIT(disk) \
(disk)->reads = (disk)->writes = \ (disk)->reads = (disk)->writes = \
(disk)->read_bytes = (disk)->write_bytes = \ (disk)->read_bytes = (disk)->write_bytes = \
(disk)->queue = (disk)->time = SIGAR_FIELD_NOTIMPL; (disk)->queue = (disk)->time = \
(disk)->service_time = SIGAR_FIELD_NOTIMPL; \
(disk)->snaptime = 0
#define SIGAR_DISK_STATS_NOTIMPL(fsusage) \ #define SIGAR_DISK_STATS_NOTIMPL(fsusage) \
SIGAR_DISK_STATS_INIT(&fsusage->disk) SIGAR_DISK_STATS_INIT(&fsusage->disk)