banyak contohnya di sini http://bash.cyberciti.biz/shell/monitoring/
ini contoh paling sederhana :
Program untuk cek kapasitas hardisk ...
==============================================================
#!/bin/bash
list_hd=`df -h | awk '{print $6}' | grep -v Mounted`
echo "==============="
echo "$list_hd"
echo "---------------"
echo "Pilih Hardisk : "
read hd
echo "=============="
use=`df -h $hd | awk '{print $5}' | tail -1 | cut -d"%" -f1`
w=70
c=90
if [ $use -ge $w ] && [ $use -le $c ]
then
echo "Warning !"
echo "Data storage capacities is $w% used or more."
elif [ $use -gt $c ]
then
echo "Critical !!!"
echo "Data storage capacities is $c% user or more, please contact
administrator to solving this problem."
else
echo "Disk usage is $use%."
fi
exit 0
===========================================================
ato, mau bikin program ap? disharing aj dsni, urang kerjakeung bareng2 ...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Klub
Linux Bandung" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/klub-linux-bandung?hl=en
-~----------~----~----~----~------~----~------~--~---