How to add swap space on the linux server?
total used free shared buffers cached
Mem: 32186 32024 161 0 248 6086
-/+ buffers/cache:25690 6496
Swap: 4094 4094 0</p>
root@server12:/var/tmp> dd if=/dev/zero of=/var/tmp/swap/swap0 bs=4096 count=1048576
1048576+0 records in
1048576+0 records out
4294967296 bytes (4.3 GB) copied, 33.6008 seconds, 128 MB/s
root@server12:/var/tmp> mkswap /var/tmp/swap/swap0
Setting up swapspace version 1, size = 4294963 kB
root@server12> swapon /var/tmp/swap/swap0
root@server12> free -m
total used free shared buffers cached
Mem: 32186 31942 244 0 99 6225
-/+ buffers/cache: 25617 6569
Swap: 8190 4094 4095
root@server12> swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 4192924 4192924 -1
/var/tmp/swap/swap0 file 4194296 0 -2
root@server12></div>