From 0522dd045eb8f7142a788142aadae9090a8f7e52 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 2 Aug 2007 04:29:34 +0000 Subject: [PATCH] swap rate metrics notimpl (tmp) for older solaris --- src/os/solaris/solaris_sigar.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index 8c34b5b1..d795a1b5 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -249,11 +249,16 @@ int sigar_swap_get(sigar_t *sigar, sigar_swap_t *swap) swap->free <<= sigar->pagesize; swap->used <<= sigar->pagesize; - swap->page_in = swap->page_out = 0; - + swap->page_in = swap->page_out = SIGAR_FIELD_NOTIMPL; + if (sigar_kstat_update(sigar) == -1) { return errno; } + if (!kstat_lookup(sigar->kc, "cpu", -1, "vm")) { + return SIGAR_OK; + } + + swap->page_in = swap->page_out = 0; /* XXX: optimize out kstat_lookup */ /* XXX: these stats do not exist in this form on solaris 8