ÇÑ°¡Áö »ý°¢À» ¸øÇÏ°í ³Ñ¾î°£ºÎºÐÀº MRTG¸¦ µ¹¸±¶§ º¸¸é 1°³¾¿ µ¹¸®°í ÀÖ´Ù´Â »ç½Ç...
ÇѲ¨¹ø¿¡ ¹é±×¶ó¿îµå·Î ¿©·¯°³¾¿ ¿î¿µÇغ¸¸éÀº...¾î¶°ÇÒÁö....
´õ±º´Ù³ª CPU »ç¿ë·üµµ ¿©À¯°¡ ÀÖ´Ù.
±âÁ¸¿î¿µ MRTG ½ºÅ©¸³Æ®... 5ºÐ´ÜÀ§·Î ¿î¿µµÇ°Ô ÆÄÀÏ·Î ¸¸µé¾î¼ crontab ¿¡¼³Á¤ÇصξúÀ½.
/usr/bin/mrtg /mrtg/cfg/1.cfg --logging /var/log/mrtg.log
/usr/bin/mrtg /mrtg/cfg/2.cfg --logging /var/log/mrtg.log
/usr/bin/mrtg /mrtg/cfg/3.cfg --logging /var/log/mrtg.log
.................................................................................
.................................................................................
.................................................................................
1°³¾¿ MRTG¸¦ µ¹¸±¶§...
CPU¿¡ ¾ÆÁ÷ ¿©À¯°¡ ÀÖÀ½ÀÌ;;; ±×·¡¼ 5°³¾¿ ¹é±×¶ó¿îµå·Î µ¹·Áº¸¸é.....
¡Ø ½Ã°£Àº °ÅÀÇ Àý¹ÝÀ¸·Î ´ÜÃà
4:30 ==> 2:23
4:58 ==> 3:12
1°³¿Í 5°³¾¿ µ¹¸±¶§ÀÇ CPU ¸ð´ÏÅ͸µ º¯È
¡Ø ±âÁ¸¿¡ ¿î¿µÇÏ´ø ½ºÅ©¸³Æ® ÆÄÀÏ¿¡¼ 5°³¾¿ ¹é±×¶ó¿îµå·Î ½ÇÇàÇÏ´Â ½ºÅ©¸³Æ®
#!/bin/bash
mrtg_sh=/etc/sysconfig/5min_mrtg.sh # ±âÁ¸ mrtg 5ºÐ ½©
check_count=5
let no=0
logger start $0 # /var/log/message ½ÃÀ۷αë
sed -e 1d $mrtg_sh |grep -v ^# |grep -v ^$ \
| while read mrtgscript ; do
let no=no%$check_count
if [ "$no" == "0" ] ; then
wait
fi
$mrtgscript &
let no=no+1
done
logger end $0 # /var/log/message Á¾·á·Î±ë