°Ô½Ã¹° 1,369°Ç
   
½Ã½ºÅÛ »ç¾ç / µð½ºÅ© Àбâ,¾²±â¿¡ µû¸¥ MRTG ¼ÓµµÈ®ÀÎ (2)
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2010-01-06 (¼ö) 20:57 Á¶È¸ : 10096
±ÛÁÖ¼Ò :
                                

ÇÑ°¡Áö »ý°¢À» ¸øÇÏ°í ³Ñ¾î°£ºÎºÐÀº 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 Á¾·á·Î±ë


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.