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 -s-showto seedisplay a definable table of swap devices and sizesareas (where swaponswapon -sis installeddeprecated)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 sizesswap -sto see total swap size, used & freevmstatto 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.