Server throttling... will soon throttle server

Joey Smith codeatlas at yahoo.com
Fri Sep 28 18:37:10 UTC 2001


Just in case this problem is caused by my script that
i use to execute the inn+suck combo, I am posting it
below.

If there is anything incorrect about it, please feel
free to point me in the right direction :-)

usuck.sh:
#!/bin/bash

#The obligatory defines for ease of use
NewsServer=$1
DD=/root/conf.${NewsServer}
DM=/root/msgs.${NewsServer}
DT=/root/conf.${NewsServer}
HF=/var/lib/news
BF=/root/SUCK.${NewsServer}

SUCK=/usr/bin/suck
INNXMIT=/usr/bin/innxmit
INND=/etc/rc.d/init.d

SCRIPTLOG=/var/log/suck.log


#Check the validity of said NewsServer...
testhost ${NewsServer} -s
REMOTE_RESULT=$?
		
if [ $REMOTE_RESULT -eq 0 ]
then
	echo `date` "	USUCK SCRIPT	SUCCESS	$NewsServer
Validated as a host" >> ${SCRIPTLOG}

	echo "$rServer is a valid host... "
	echo
	echo

	#Make the needed directories incase this is a first
run for the specified server...
	#If not a first run, mkdir will just complain about
it and program will continue
	# (aka i need to figure out how to test if a
directory exists or not)
	mkdir ${DD}
	mkdir ${DT}
	mkdir ${DM}


	echo `date` "	USUCK SCRIPT	NEUTRAL	Running ${SUCK}
${NewsServer} -dd ${DD} -dm ${DM} -dt ${DT} -c -a -D 
-hl ${NewsServer} -HF ${HF} -i -10 -M -n -T 3360 -A
-bf ${BF}" >> ${SCRIPTLOG}
	#Now we get onto buisness - the beast that is suck
rears its head here
	${SUCK} ${NewsServer} -dd ${DD} -dm ${DM} -dt ${DT}
-c -a -D  -hl ${NewsServer} -HF ${HF} -i -10 -M -n -T
3360 -A -bf ${BF}

	echo `date` "	USUCK SCRIPT	NEUTRAL	Running ${INNXMIT}
localhost ${BF}" >> ${SCRIPTLOG}
	echo `date` "	USUCK SCRIPT	RESPONSE	innxmit response:
" `${INNXMIT} localhost ${BF}` >> ${SCRIPTLOG}

	#have to have this in there do to the server
throttling...

	echo `date` "	USUCK SCRIPT	NEUTRAL	restaring innd..."
>> ${SCRIPTLOG}
	${INND} stop
	${INND} start
	echo `date` "	USUCK SCRIPT	SUCCESS	innd restart
successfull" >> ${SCRIPTLOG}
else
	echo `date` "	USUCK SCRIPT	ERROR	$NewsServer is not a
valid host" >> ${SCRIPTLOG}
	echo
	echo "Failed to connect to host $NewsServer"
fi




__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com


More information about the inn-workers mailing list