From: zoo11@mail.hst.co.kr
Date: Sun May 05 2002 - 22:22:47 EDT
Hi.
I'm trying to write a small program using libkstat.
I wanna print "freemem" value in unix.0.vminfo (module.instance.name)
which is KSTAT_TYPE_RAW. I know this data structure is same with
of vmstat_t of /usr/include/sys/sysinfo.h.
but when I tryed to print "freemem", I got 0.
below is my code..
..
..
..
ksp = kstat_lookup(kc, NULL, -1, "vminfo");
vi = (vminfo_t *) malloc(sizeof(vminfo_t));
kstat_read(kc, ksp, vi);
printf("%s\t%d\t%s\n", ksp->ks_module, ksp->ks_instance, ksp->ks_name);
printf("\t\tfreemem : %ll\n", vi->freemem);
free(vi);
..
..
any idea?
thanks in advance.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:17 EDT