B / Y / U / S
HOME À¥ È£½ºÆà µµ¸ÞÀÎ ¸Å´º¾ó °í°´Áö¿ø ¼³Á¤Á¤º¸ °èÁ¤½Åû 2024-12-25 Wednesday 
À¥ È£½ºÆÃ
# °øÁö »çÇ×
# ÀÚÁÖ ¹¯´Â Áú¹®
# Áú¹®°ú ´äº¯
# °¡ÀÔ ¹®ÀÇ
Ä¿¹Â´ÏƼ
# ÀÚÀ¯°Ô½ÃÆÇ
# ¸®´ª½ºÆÁ
# ¾ÆÀÌÅ¥ Å×½ºÆ®
# ³»È¨ ¼Ò°³
# °Ö·¯¸®
# ÀÚ·á½Ç

  ¸®´ª½ºÆÁ  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°³°¡ ³Ñ¾î°¡±â Àü¿¡
¼­¹ö°¡ Á×¾î¹ö¸®¸é Çê°ÍÀÓ ^.^;;;
Regist Addr [ 192.168.0.2 ] ¸ñ·Ïº¸±â À­±Û ¾Æ·§±Û
Á¤±ÔÇ¥Çö½Ä [ »ó¼¼ °Ë»ö ]
Page Loading [ 0.02 Sec ] SQL Time [ 0 Sec ]

Copyleft 1999-2024 by JSBoard Open Project
Theme Designed by IDOO And follow GPL2

°³ÀÎÁ¤º¸ Ãë±Þ¹æħ ÀÌ¿ë ¾à°ü »çÀÌÆ® ¸Ê ¾îµå¹Î °ü¸®