Linux下创建和加载swap
#创建swap
mkswap /dev/vda5
#编辑fstab
vi /etc/fstab
#增加如下行
/dev/vda5 none swap sw 0 0
#挂载swap
mount -a
swapon -a
#查看状态
top
#状态可能显示如下,最后一行为新挂载的swap
top - 22:17:59 up 23:48, 1 user, load average: 0.00, 0.01, 0.05
Tasks: 75 total, 1 running, 71 sleeping, 3 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1019536k total, 455332k used, 564204k free, 62388k buffers
Swap: 1045500k total, 0k used, 1045500k free, 187772k cached
相关推荐
tianhuak 2020-11-24
farwang 2020-11-25
星愿心愿 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
以梦为马不负韶华 2020-10-20
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20
liuhangtiant 2020-10-20