How can I check if swap is active from the command line?
in linux, you can use
cat /proc/meminfoto see total swap, and free swap (all linux)
cat /proc/swapsto see which swap devices are being used (all linux)
swapon -sto see swap devices and sizes (where swapon is installed)
vmstatfor current virtual memory statistics
in Mac OS X, you can use
vm_statto see information about virtual memory (swap)
ls -lh /private/var/vm/swapfile*to see how many swap files are being used.
in Solaris, you can use
swap -lto see swap devices/files, and their sizes
swap -sto see total swap size, used & free
vmstatto see virtual memory statistics
On some systems, "virtual memory" refers only to disk-backed memory devices, and on other systems, like Solaris, Virtual Memory can refer to any user process address space, including tmpfs filesystems (like /tmp) and shared memory space.
Also, `free` should tell you how much swap is available to your system.