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. :)

This article was posted by Matty on 2007-01-28 15:25:00 -0400 -0400