How can I check if swap is active, and which swap devices are set up, on the command line?
How can I check if swap is active from the command line?
swap
in linux, you can use cat /proc/meminfo to see total swap, and free swap  (all linux)cat /proc/swaps to see which swap devices are being used  (all linux)swapon -s to see swap devices and sizes (where swapon is installed)vmstat for current virtual memory statisticsin Mac OS X, you can usevm_stat to 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 useswap -l to see swap devices/files, and their sizesswap -s to see total swap size, used & freevmstat to see virtual memory statisticsOn 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.