Linux
To find out how much swap space has been allocated and is currently being used, use either the swapon or top commands on Linux:
% /sbin/swapon -s
Filename Type Size Used Priority
/dev/hda7 partition 128484 28 -1
% top
jcownie@pc2: top
(null) 1:29pm up 4:28, 1 user, load average: 0.00, 0.00, 0.00
52 processes: 50 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 1.1% user, 0.4% system, 0.0% nice, 98.4% idle
Mem: 127904K a, 116512K used, 11392K free, 36020K shrd, \
3632K buff
Swap: 128484K av, 28K used, 128456K free 79804K
cached
... remainder of "top" listing removed ...
You can use the mkswap(8) command to create swap space. The swapon(8) command tells Linux that it should use this space.