Appendix B: Kernel Variable Work Page B 1
Information Technology Honours Thesis October 1994
Appendix B Kernel Variable Work
Chapter 41 refers to research done in obtaining meaningful kernel variables. This Appendix
provides a kernel variable summary as well as sample output and source code from the kernel
variable querying program outlined in the text.
Kernel Variable Summary
Table 132 provides a comprehensive list of kernel variables encountered while conducting
research. Information held within this table was obtained from personal experience and
miscellaneous source code for system utilities (e.g. top and vmstat) and system include files.
The name and datatype columns are self explanatory. The access method refers to the
addresses parameter to be used in the kvm_read() system call. The next column states whether
the kernel variable has been used in the load sharing daemon presented in Chapter 6. Finally a
description is given based on the apparent meaning and use of the variable.
1. From the Section entitled ?Kernel Variables? on page 29, through other Sections up to page 33. 2. Footnotes associated with the table are located at the end of the table (on page B-3).
Table 13: Summary of kernel variable knowledge.
Name Datatype Access Method In
_acctbuf struct accta acct; &acct no System accounting structure.
_avenrun intb aven; (int *)aven yes Short, medium and long term system load averages.
_boottime time_t boottime; (&boottime) yes Machine boottime.
_ccpu int ccpu; (int *)(&ccpu) no Experientially based CPU property. Used by top.
_cnt struct vmmeterc
&vm no Virtual memory statistics (1 second interval statistics).
_cp_time int time
(int *)time yes Cumulative representation of a machine?s CPU time distribution
_dk_bps int bps[DRIVESe]; (bps) no Drive speed in bits per second.
_dk_busy int busy; (int *)(&busy) no Indicates disk activity. Takes the
value of 1 if data is being
transferred to disk.