0
喜逢身體 我試圖用「DF -oi」命令監視號碼
我寫腳本如下因素線
#FS_LIST=`df -o i | grep -v Filesystem | awk '{print $6}' | egrep -v "fd|proc" | tr -d "/"`
FS_LIST=`df -o i | grep -v Filesystem | grep -v cdrom | awk '{print $6}' | egrep -v "fd|proc" `
for FS in $FS_LIST;
do
CAPACITY=`df -o i "/${FS}" | awk '{print $5}' | tail -1 | tr -d %`
LIMIT=80
DESC="FS=$FS , Capacity=${CAPACITY}% , Limit=${LIMIT}%"
# echo $DESC
if [ $CAPACITY -gt $LIMIT ]
then
LOGIC_ID="${HOST}_${FS}_${CAPACITY}_Is_Over_Limit"
echo "LOGIC_ID = " $LOGIC_ID
#Send_Alarm_Up;
監控文件的容量shell腳本
和我收到這個筆記
df: operation not applicable for FSType autofs
df: operation not applicable for FSType ctfs
df: operation not applicable for FSType devfs
df: operation not applicable for FSType fd
df: operation not applicable for FSType hsfs
df: operation not applicable for FSType mntfs
df: operation not applicable for FSType nfs
df: operation not applicable for FSType objfs
df: operation not applicable for FSType proc
df: operation not applicable for FSType sharefs
df: operation not applicable for FSType tmpfs
我做了什麼錯?
什麼是'DF -o i'該怎麼辦? – Gabe 2011-03-09 08:19:34