swap rate metrics notimpl (tmp) for older solaris

This commit is contained in:
Doug MacEachern 2007-08-02 04:29:34 +00:00
parent e93de3b1dc
commit 0522dd045e
1 changed files with 7 additions and 2 deletions

View File

@ -249,11 +249,16 @@ int sigar_swap_get(sigar_t *sigar, sigar_swap_t *swap)
swap->free <<= sigar->pagesize; swap->free <<= sigar->pagesize;
swap->used <<= 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) { if (sigar_kstat_update(sigar) == -1) {
return errno; 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: optimize out kstat_lookup */
/* XXX: these stats do not exist in this form on solaris 8 /* XXX: these stats do not exist in this form on solaris 8