$ sudo cat /proc/slabinfo slabinfo - version: 2.1 # name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> ... sigqueue 100 100 160 25 1 : tunables 0 0 0 : slabdata 4 4 0 sighand_cache 355 405 2112 15 8 : tunables 0 0 0 : slabdata 27 27 0 kmalloc-8192 96 96 8192 4 8 : tunables 0 0 0 : slabdata 24 24 0 ...
The first line of output includes a version number, which allows an application that is reading the file to handle changes in the file format. (See VERSIONS, below.) The next line lists the names of the columns in the remaining lines.
Each of the remaining lines displays information about a specified cache. Following the cache name, the output shown in each line shows three components for each cache:
The statistics are as follows:
The tunables entries in each line show tunable parameters for the corresponding cache. When using the default SLUB allocator, there are no tunables, the /proc/slabinfo file is not writable, and the value 0 is shown in these fields. When using the older SLAB allocator, the tunables for a particular cache can be set by writing lines of the following form to /proc/slabinfo:
# echo 'name limit batchcount sharedfactor' > /proc/slabinfo
Here, name is the cache name, and limit, batchcount, and sharedfactor are integers defining new values for the corresponding tunables. The limit value should be a positive value, batchcount should be a positive value that is less than or equal to limit, and sharedfactor should be nonnegative. If any of the specified values is invalid, the cache settings are left unchanged.
The tunables entries in each line contain the following fields:
The slabdata entries in each line contain the following fields:
Note that because of object alignment and slab cache overhead, objects are not normally packed tightly into pages. Pages with even one in-use object are considered in-use and cannot be freed.
Kernels configured with CONFIG_DEBUG_SLAB will also have additional statistics fields in each line, and the first line of the file will contain the string "(statistics)". The statistics field include : the high water mark of active objects; the number of times objects have been allocated; the number of times the cache has grown (new pages added to this cache); the number of times the cache has been reaped (unused pages removed from this cache); and the number of times there was an error allocating new pages to this cache.