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

  ¸®´ª½ºÆÁ  Go Unix Power Tools Online Book Go Bash Guide
Read No. 140 article 2002-04-29 03:20:43
NickName   Ç®ºñ´©
Subject   httpd Æ®·¡ÇÈ ºÐ¼® ¹× ´ëó
¾ÆÆÄÄ¡¿¡ ±âº» Á¦°øµÇ´Â server-status Ç׸ñÀ» on ½ÃÄÑ¾ß ºÐ¼®ÀÌ °¡´É
ÇÕ´Ï´Ù. 

# cat traffic 
++++++++++++++++++++++++++++++++++

#!/bin/bash

# ÀÔ¸À¿¡ ¸À°Ô ¼öÁ¤
limit=10
refer="http://www.byus.net/server-status"
mailaddr="sontina at chollian.net"

# httpd network traffic
speed=$(lynx -nolist -verbose -dump http://www.byus.net/server-
status|head -n15|grep "requests/sec"|awk '{print $4}')
echo "Current Httpd Network Traffic : $speed"

# interger transfer
speed=$(echo $speed|cut -d. -f 1)

# if
if (( $speed > $limit )) ; then
lynx -nolist -verbose -dump $refer > /tmp/traffic.tmp
mail -s "Httpd traffic overrun" $mailaddr < /tmp/traffic.tmp
rm -rf /tmp/traffic.tmp
#/etc/init.d/httpd restart
fi
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

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