DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

NAME

kmeminfo - display the kernel memory structure

SYNOPSIS

kmeminfo

DESCRIPTION

The kmeminfo macro displays the kernel memory information at the time of the dump. It can be used to determine how much kernel memory is available, how much is allocated and whether or not there have been any failed requests for kernel memory.

The kmeminfo structure is defined in /usr/include/sys/sysinfo.h

The kmeminfo struct has three groups of three fields. The meanings are: km_mem contains the memory (in bytes) which is currently in an allocation pool, km_alloc is how much of that pool is currently allocated and km_fail indicates how many allocation requests from that pool have been rejected.

The fields in slot 0 (zero), apply to the KMEM_SMALL pool (under 256 byte allocations), slot 1 applies to KMEM_LARGE (up to 16384 bytes) and slot 2 is for KMEM_OSIZE (anything larger than 16384). For oversize allocations, there is no pool. Requests are rounded up to a page boundary and the page allocator is called directly. This means km_mem[2] must always be zero. If not, the kmeminfo struct must be corrupt.

Typical output looks like this:


  S> kmeminfo
  km_mem[0]    00085000 
  km_mem[1]    000B4000
  km_mem[2]    00000000
  km_alloc[0]  00066E80 
  km_alloc[1]  0009E400
  km_alloc[2]  00147000
  km_fail[0]   00000000
  km_fail[1]   00000000
  km_fail[2]   00000000

DEFINED IN

info.k

SEE ALSO

minfo, mpinfo, rtminfo, shlbinfo, syserr, sysinfo, syswait, tune, vminfo

APPENDIX A: Alphabetic Index of Macros