Commit 25bf7588 authored by Kirk Webb's avatar Kirk Webb

Changes to startup scripts to fire up the new slothd (uses tmcc to grab

parameters). Install target update as well.
parent a337f7b9
......@@ -76,6 +76,7 @@ local-script-install: common-script-install
$(INSTALL) -m 755 $(SRCDIR)/rc.delta $(BINDIR)/rc.delta
$(INSTALL) -m 755 $(SRCDIR)/rc.progagent $(BINDIR)/rc.progagent
$(INSTALL) -m 755 $(SRCDIR)/rc.setup $(BINDIR)/rc.setup
$(INSTALL) -m 755 $(SRCDIR)/rc.slothd $(BINDIR)/rc.slothd
# Symlink this cause we invoke it from boss, and its too much
# of a hassle to worry about right now.
rm -f $(ETCDIR)/update
......
......@@ -66,11 +66,11 @@ if [ -x $BINDIR/rc.healthd ]; then
$BINDIR/rc.healthd start
fi
if [ -x $BINDIR/slothd ]; then
if [ -x $BINDIR/rc.slothd ]; then
echo "Starting usage detector ..."
killall slothd
killall slothd > /dev/null 2>&1
rm -f /var/run/slothd.pid
$BINDIR/slothd
$BINDIR/rc.slothd start
fi
if [ -x $BINDIR/watchdog ]; then
......
#!/bin/sh
USAGE="usage: $0 (start|stop|restart)"
if [ $# -lt 1 ]
then
echo $USAGE
exit 1
fi
. /etc/emulab/paths.sh
ARGS=
SEDCMD='sed -e s/^.*=\(.*\)/\1/'
start () {
for arg in `${BINDIR}/tmcc sdparams`
do
case $arg in
reg*)
ARGS="$ARGS -i `echo $arg | $SEDCMD`"
;;
agg*)
ARGS="$ARGS -g `echo $arg | $SEDCMD`"
;;
load*)
ARGS="$ARGS -l `echo $arg | $SEDCMD`"
;;
expt*)
ARGS="$ARGS -c `echo $arg | $SEDCMD`"
;;
ctl*)
ARGS="$ARGS -n `echo $arg | $SEDCMD`"
;;
esac
done
${BINDIR}/slothd ${ARGS}
}
stop () {
kill `cat /var/run/slothd.pid`
}
case $1 in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo "Command $1 not valid"
echo $USAGE
exit 1
;;
esac
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment