From 382dcba03834962e2d87bd9185a61cebc816f451 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 3 Nov 2007 23:01:20 +0000 Subject: [PATCH] add disk service_time field --- include/sigar.h | 3 +++ include/sigar_private.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/sigar.h b/include/sigar.h index ddc922ae..f6d6e90d 100644 --- a/include/sigar.h +++ b/include/sigar.h @@ -442,6 +442,8 @@ typedef struct { sigar_uint64_t rtime; sigar_uint64_t wtime; sigar_uint64_t time; + sigar_uint64_t snaptime; + double service_time; } sigar_disk_usage_t; /* XXX for sigar_file_system_usage_t compat */ @@ -450,6 +452,7 @@ typedef struct { #define disk_write_bytes disk.write_bytes #define disk_read_bytes disk.read_bytes #define disk_queue disk.queue +#define disk_service_time disk.service_time typedef struct { sigar_disk_usage_t disk; diff --git a/include/sigar_private.h b/include/sigar_private.h index 462cefd6..64841262 100644 --- a/include/sigar_private.h +++ b/include/sigar_private.h @@ -312,7 +312,9 @@ int sigar_group_name_get(sigar_t *sigar, int gid, char *buf, int buflen); #define SIGAR_DISK_STATS_INIT(disk) \ (disk)->reads = (disk)->writes = \ (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) \ SIGAR_DISK_STATS_INIT(&fsusage->disk)