kernel statistics, swap and real memory, vminfo

From: Trent Petrasek (tpetrasek@internap.com)
Date: Thu Oct 23 2003 - 14:53:29 EDT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings all,

I have been writing a little bit of perl to grab statistics out of the kernel and send them to our centralized statistics server where the information gets parsed and put into pretty graphs for the people that need pictures. I've run into a snag that has me stumped, the Sun Developer's documentation and Google have been little help.

My question is this, in the ::vminfo: space of kstat, what format are the values in? A little output below:

unix:0:vminfo:class vm
unix:0:vminfo:crtime 42.637873561
unix:0:vminfo:freemem 135909280573
unix:0:vminfo:snaptime 1895914.19669533
unix:0:vminfo:swap_alloc 19668677225
unix:0:vminfo:swap_avail 371298905809
unix:0:vminfo:swap_free 373885807817
unix:0:vminfo:swap_resv 22255579233

Now, the documentation is conflicting. Some documentation claims that these value are pages (/usr/include/sys/sysinfo.h) and other documentation (I can't find the URL now) claims they are "blocks" (the 512 byte variety, I assume). The system I have run the example on has 1.0G of disk swap space. I'm confounded by the numbers shown above. If a page is 8k, there is no way I could have 371298905809 available pages. If the number is in blocks, there's still no way I could have 371298905809 available blocks. There has got to be something I am missing about this value and how it converts into a more human readable figure.

Very confused here.. any insight is most welcome.

OS and architecture: Solaris 8 02/02, Generic_108528-13 in 64 bit mode, on a SUNW,Ultra-60

Kindest regards,

Trenton Petrasek

- --------------------------------------------------------
 Trenton Petrasek * Internap Network Services
 Systems Engineer * The Internet Performance
 IT Services * Company
 404.302.9742 *
 tpetrasek@internap.com * http://www.internap.com
- --------------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/mCOp1CLn4SP2qlMRAvhUAKCu9tZ3f5De0jHRmX+u3o30G+KySwCdE7cZ
MQThBhbRATKQumwCFHkwLdo=
=SB6v
-----END PGP SIGNATURE-----
_______________________________________________
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:27:21 EDT