推 JayLane:恩 這也是個辦法 12/03 15:27
※ 引述《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%.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.249.207.134
※ 編輯: dyoll 來自: 60.249.207.134 (11/26 19:34)