vmstat source code

i am looking for vmstat source code or a listing of the kernel symbols that vmstat uses in the knlist subroutine. Interested in getting vmstat stats from a c program using knlist subroutine, but i dont know what the names of the kernel symbols are that i need to access.

thanks in advance::slight_smile:

For what kernel? Open source stuff is easy to find by definition:
http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/vmstat/
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/vmstat/
http://lxr.linux.no/source/

Any particular kernel / Unix variant / version?

aix 4.3.3.0

the knlist function seems simple enough to use, but i dont know the name of the kernel symbol for idle time. i've seen examples of the knlist subroutine used to get "ncpus" which i assume is number of cpus on the machine. a list of kernel symbols for aix would be helpful. thanx again.