|
|
|
¸®´ª½ºÆÁ Go Unix Power Tools Online Book
Go Bash Guide
|
|
Read No. 115 article |
2002-02-26 22:06:13 |
|
|
|
|
NickName |
Ç®ºñ´© |
Subject |
httpd µ¥¸óÀÌ ÀÏÁ¤¼ö ÀÌ»ó ¿Ã¶ó°¡¸é httpd restart |
|
|
[root@Tina myscript]# cat /etc/apache_reset
#!/bin/bash
http_count=$(ps -aux|grep -c httpd)
echo "httpd daemon : $http_count"
numbers=80
if (( $http_count > $numbers )) ; then
echo "httpd count °¡ $numbers°³¸¦ ³Ñ¾ú½À´Ï´Ù. ¾ÆÆÄÄ¡ ¼¹ö¸¦ Àç½ÃÀÛÇÕ´Ï
´Ù."
/etc/init.d/httpd restart
fi
ÀÌ¿Í °°ÀÌ ÆÄÀÏÀ» ÀÛ¼ºÇÑ ÈÄ¿¡ /etc/crontab ¿¡
*/5 * * * * root /etc/apache_reset
ÀÌ·¸°Ô ¼³Á¤ Çصθé 5ºÐ¸¶´Ù üũ ÇÔ.
ÀÌ´Â ÀÏÁ¤¼ö($numbers) ÀÌ»óÀÌ¸é ¼¹ö °ÅºÎ°ø°ÝÀ» ÀǽÉÇÒ ¼ö ÀÖÀ¸¹Ç·Î
µ¥¸óÀ» ÀÚµ¿À¸·Î Àç½ÃÀÛÇÏ°Ô ÇÑ´Ù. ¹°·Ð 100°³°¡ ³Ñ¾î°¡±â Àü¿¡
¼¹ö°¡ Á×¾î¹ö¸®¸é Çê°ÍÀÓ ^.^;;;
|
|
Page Loading [ 0.02 Sec ]
SQL Time [ 0 Sec ]
|
|
|