[RC5] kindler gentler rc5

steve,,, vort at resnet124.unm.edu
Sun Nov 23 00:54:58 EST 1997


hey folks, there were a few of you who asked me for the scripts i use to 
stop clients when people login, and resume when they log out, i usually
run it out of cron every minute to check, it makes for interesting load
graphs.  I run it at work and the charts are available at:
http://www.cs.unm.edu/CSsupport/net/net_info/slug/slug.html

as people login to the machines running it, the load tends to dwindle, and
as they logout it tends to spike, some example machines are thelma, shaggy
and the rockstars dead before their time ( joplin, hendrix, holly, etc...)

ive tossed the script up at ftp://flux.unm.edu/pub/rc5nicer

my cron entry reads( i only run it from 7:59am-11:59pm): 
* 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * *  \
/nfs/u10/armijo/bin/linux/rc5nicer

then i also run a program that makes sure the clients are running on machines
i designate , i call it cowdog , it reads something like:

#!/bin/csh
foreach x ( badshot scooby thelma shaggy sneezy truth consequences gila \
surfing shiva sherman hatch red-rocket pink-parasol sunset peabody blood \
mercy portal )
echo $x
  ssh $x "nohup /nfs/u10/armijo/bin/linux/herdem > /dev/null &" &
end
foreach j (holly valens morrison mamacass joplin hendrix garcia \
bruce lenon garland infinity picasso lexington saratoga degas seurat surf \
ccr )
echo $j
 ssh $j "/nfs/u10/armijo/bin/irix/Iherdem" &
end
foreach j (crow sloth avarice )
echo $j
 ssh $j "nohup /nfs/u10/armijo/bin/freebsd/Fherdem > /dev/null &" &
end

and the cron entry reads:

7,27,47 * * * * /nfs/u10/armijo/bin/cowdog

and the files it calls ( herdem) make sure nobody is already running an rc5 
client on that machine, and if they aren't, it copies over the newest version
i have, and starts it running:

#!/bin/sh
if [ `ps -auwwwx | grep rc5 | grep -v grep | grep -v sh | cut -c60-79`]
then
 echo -n > /dev/null
else
 mkdir /tmp/run.cow
 cp ~/rc5/rc56401/rc5* /tmp/run.cow
 /tmp/run.cow/rc564 &
fi

maybe some of you will find this useful, I'm always open to critiques, and
now that im looking it over i realize what ill be doing tonight ( i probably
should have just written it in perl to begin with )

-steve

-- 
 http;//flux.unm.edu - Modern scooter website!
   I have plenty of common sense, i just choose to ignore it. -Calvin
 "Look for clues inside the baby's head, hear the words yet to be said, 
  cue the music fade to black, no such thing as no payback"    - PWEI
--
To unsubcribe, send 'unsubscribe rc5' to majordomo at llamas.net
rc5-digest subscribers replace rc5 with rc5-digest



More information about the rc5 mailing list