Checking swap usage on Solaris, Linux and OpenBSD hosts

Each and every operating systemI support has a different utility to report on swap usage. On my Soalris hosts, I use the swap and vmstat utilities to check utilization:

$ swap -s

total: 36176k bytes allocated + 4672k reserved = 40848k used, 1189004k available

On Linux hosts, I use teh free and top utilities:

$ free

             total       used       free     shared    buffers     cached
Mem:       2055340    1427696     627644          0     179124     876300
-/+ buffers/cache:     372272    1683068
Swap:      1004052          0    1004052

And on my OpenBSD servers, I use the swapctl and systat utilities:

$ swapctl -l

Device      512-blocks     Used    Avail Capacity  Priority
swap_device     262068        0   262068     0%    0

Oh how I wish there was an administrator tool naming standard. :)

2 thoughts on “Checking swap usage on Solaris, Linux and OpenBSD hosts”

  1. Hello, thanks for the tips. I am looking for is “why do I have little free space & lots of swap used”.

    There are typos in this page.

    In, “On my Soalris hosts” Solaris is mispelled and see “teh free”.

    Good page otherwise!

    -Jason

  2. Is there a similar guideline to Solaris in terms of page scanner scan rate? e.g. On solaris high sr values from vmstat indicate impending memory shortage. I can see there is kswapd (This is Red Hat I’m looking at) but how do I monitor it’s activity?

    Thanks – great blog.

    -Bob (Solaris old timer struggling to get into Red Hat more) T.

Leave a Reply

Your email address will not be published. Required fields are marked *