1.檢視系統swap空間使用
[root@jumper usr]# free
total used free shared buffers cached
mem: 513980 493640 20340 0 143808 271780
-/+ buffers/cache: 78052 435928
swap: 1052248 21256 1030992
2.在空間合適處建立swap檔案
[root@jumper usr]# mkdir swap
[root@jumper usr]# cd swap
[root@jumper swap]# dd if=/dev/zero of=swapfile bs=1024 count=10000 //說明: count的值就是要增加的swap的大小,目前新增的大小大致為10m
10000+0 records in
10000+0 records out
[root@jumper swap]# ls -al
total 10024
drwxr-xr-x 2 root root 4096 7月 28 14:58 .
drwxr-xr-x 19 root root 4096 7月 28 14:57 ..
-rw-r--r-- 1 root root 10240000 7月 28 14:58 swapfile
[root@jumper swap]# mkswap swapfile
setting up swapspace version 1, size = 9996 kib
3.啟用swap檔案
[root@jumper swap]# swapon swapfile
[root@jumper swap]# ls -l
total 10016
-rw-r--r-- 1 root root 10240000 7月 28 14:58 swapfile
[root@jumper swap]# free
total used free shared buffers cached
mem: 513980 505052 8928 0 143900 282288
-/+ buffers/cache: 78864 435116
swap: 1062240 21256 1040984
[root@jumper swap]#
aix 5 swap空間調整
page space較高時,可以用vmstat,svmon定時跟蹤一下,看看到底什麼原因用掉記憶體,把不用的程序 多餘的服務都kill掉。或者也可以增加swap空間來緩解,下面看乙個例子。1 檢視swap空間大小和使用率,發現在 rootvg 的第一塊硬碟上預設的分頁邏輯卷為hd6 2 檢視root...
增加Linux的Swap空間
在linux下安裝oracle的時候,提示沒有swap space,按以下方法增加。環境 ceontos6.9 執行步驟 1 檢查 swap 空間是否有設定。執行命令 swapon s如果返回為空,表示 swap 檔案不存在。2 檢查檔案系統,看是否有足夠的硬碟空間來設定 swap 執行命令 df ...
linux上swap的檢視與調整
1.檢視swap root 192 oc cat proc swaps filename type size used priority dev sda3 partition 8024 104 1 root 192 oc 2.通過dd建立檔案 root 192 oc dd if dev zero o...