Display swap space utilization

On FreeBSD, you can use pstat -s to display swap space utilization:

  1. # pstat -s
  2. Device 1K-blocks Used Avail Capacity
  3. /dev/da0p3 1048540 0 1048540 0%

There is another specified swapinfo command you can use:

  1. # swapinfo
  2. Device 1K-blocks Used Avail Capacity
  3. /dev/da0p3 1048540 0 1048540 0%

You can also display swap info in “Human-readable” format:

  1. # swapinfo -h
  2. Device 1K-blocks Used Avail Capacity
  3. /dev/da0p3 1048540 0B 1.0G 0%

Or display swap space size in megabyte unit:

  1. # swapinfo -m
  2. Device 1M-blocks Used Avail Capacity
  3. /dev/da0p3 1023 0 1023 0%

References:
PSTAT.