全部博文(136)
分类: LINUX
2008-12-11 21:59:35
[root@localhost etc]# dd if=/dev/zero of=/tmp/swap bs=4k count=100000 读入了 100000+0 个块 输出了 100000+0 个块 [root@localhost etc]# ll /tmp/swap -rw-r--r-- 1 root root 409600000 12月 11 21:40 /tmp/swap |
[root@localhost etc]# mkswap /tmp/swap Setting up swapspace version 1, size = 409595 kB |
[root@localhost etc]# free total used free shared buffers cached Mem: 1034608 1015496 19112 0 36856 725492 -/+ buffers/cache: 253148 781460 Swap: 1044184 0 1044184 [root@localhost etc]# swapon /tmp/swap [root@localhost etc]# free total used free shared buffers cached Mem: 1034608 1015768 18840 0 36912 725520 -/+ buffers/cache: 253336 781272 Swap: 1444176 0 1444176 |
[root@localhost etc]# swapoff /tmp/swap [root@localhost etc]# free total used free shared buffers cached Mem: 1034608 1030548 4060 0 38016 729368 -/+ buffers/cache: 263164 771444 Swap: 1044184 0 1044184 |