About nixCraft

Topics

Display Linux kernel slab cache information in real time

Posted by Vivek Gite [Last updated: May 21, 2006]

Linux has tons of frequently used objects in the kernel such as buffer heads, inodes, dentries, etc. and have their own cache. The file /proc/slabinfo (less /proc/slabinfo) gives statistics. It is possible that slab cache information can be used to debug kernel problems (see crash command man page for more info).

slabtop command displays detailed kernel slab cache information in real time. It displays a listing of the top caches sorted by one of the listed sort criteria. It also displays a statistics header filled with slab layer information.

It generates output like vmtop perl script but in real time:

$ vmtop

VMTOP output:

Memory:    750.6 Mb      Free:   2.2%    Buffers:  56.1%   Cached:   3.1%
                       Active:  69.3%   Inactive:  24.0%
Lowmem:    750.6 Mb      Free:   2.2%       Slab:   3.0%   Memmap:   0.0%
                       Stacks:   0.1%       PMDs:   0.0%     PTEs:   0.3%

Top slabs:
      size-131072(dma)       0.1 Mb  (Active:      0.0 Mb,   0.0% full)
           size-131072       0.1 Mb  (Active:      0.0 Mb,   0.0% full)
       size-65536(dma)       0.1 Mb  (Active:      0.0 Mb,   0.0% full)
            size-65536       0.1 Mb  (Active:      0.0 Mb, 100.0% full)
       size-32768(dma)       0.0 Mb  (Active:      0.0 Mb,   0.0% full)

Now let us see output of slabtop command:

$ slabtop

slabtop command output:

slabtop command output
(Click to enlarge)

See also:

E-mail this to a Friend    Printable Version

Capture each and every moment of life with a FREE 4 GB SD memory card with the purchase of select digital cameras from Canon, Nikon, Pentax and others from Amazon

You may also be interested in other helpful articles:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.