aix 下可以自動警告磁碟使用率超過臨界 … - Linux
By Edith
at 2009-11-26T19:33
at 2009-11-26T19:33
Table of Contents
※ 引述《JayLane (JL)》之銘言:
: 大家都知道磁碟空間滿了
: 系統可能就會出現問題
: 我自己目前是用 script 去 把 df -k 中,
: 使用率超過85%的磁碟就 mail 出來
: 然後再把這個 script 放到 crontab
: 每小時跑一次
: 但是我想問問看 aix 這種商務 server
: 內建功能沒有辦法做到嗎?
: 我如果用 errnotify
: 它只會通知 file system 使用率到達 100% 的事件
: 或是 linux 下面有類似的功能嗎?
可能不會完全的一樣,我認為這樣的功能 quota 應該可以作的
到,或是很類似。
http://tldp.org/HOWTO/Quota.html
如果你用的是 ext2 or ext3 的話,可以用 tune2fs 設定 15%
作為保留區,跟你要的功能也很接近。
man tune2fs
-m reserved-blocks-percentage
Set the percentage of the filesystem which
may only be allocated by privileged pro-
cesses. Reserving some number of filesys-
tem blocks for use by privileged processes
is done to avoid filesystem fragmentation,
and to allow system daemons, such as sys-
logd(8), to continue to function correctly
after non-privileged processes are prevented
from writing to the filesystem. Normally,
the default percentage of reserved blocks is
5%.
--
: 大家都知道磁碟空間滿了
: 系統可能就會出現問題
: 我自己目前是用 script 去 把 df -k 中,
: 使用率超過85%的磁碟就 mail 出來
: 然後再把這個 script 放到 crontab
: 每小時跑一次
: 但是我想問問看 aix 這種商務 server
: 內建功能沒有辦法做到嗎?
: 我如果用 errnotify
: 它只會通知 file system 使用率到達 100% 的事件
: 或是 linux 下面有類似的功能嗎?
可能不會完全的一樣,我認為這樣的功能 quota 應該可以作的
到,或是很類似。
http://tldp.org/HOWTO/Quota.html
如果你用的是 ext2 or ext3 的話,可以用 tune2fs 設定 15%
作為保留區,跟你要的功能也很接近。
man tune2fs
-m reserved-blocks-percentage
Set the percentage of the filesystem which
may only be allocated by privileged pro-
cesses. Reserving some number of filesys-
tem blocks for use by privileged processes
is done to avoid filesystem fragmentation,
and to allow system daemons, such as sys-
logd(8), to continue to function correctly
after non-privileged processes are prevented
from writing to the filesystem. Normally,
the default percentage of reserved blocks is
5%.
--
Tags:
Linux
All Comments
By Mason
at 2009-12-01T13:10
at 2009-12-01T13:10
Related Posts
ubuntu9.10下的libstdc++.so.5的問題
By Aaliyah
at 2009-11-26T08:20
at 2009-11-26T08:20
跟更新完聲音不見了~
By Cara
at 2009-11-26T07:56
at 2009-11-26T07:56
vm底下用hinet連線
By Isabella
at 2009-11-26T00:20
at 2009-11-26T00:20
vm底下用hinet連線
By Damian
at 2009-11-26T00:17
at 2009-11-26T00:17
要怎麼得知內建顯示卡型號?
By Necoo
at 2009-11-26T00:06
at 2009-11-26T00:06