I was wondering if anyone can shed some light on this for me. I have
finally got the script doing what I would think I wanted it to do, that
is return a list of servers based on the ranking from the nc ipaddress
9571 command.
I have the following script with a server list hardcoded in atm..
#!/bin/bash
# Takes a list of servers from the /var/lib/tftpboot/ltsp/i386/lts.conf
#and sorts that
# list based on the output of the nc rating of that server.
MY_SERVER_LIST="10.0.0.53 10.0.0.54 10.0.0.55"
TMP_LIST=""
GOOD_LIST=""
for i in $MY_SERVER_LIST; do
let "rank = `nc $i 9571 | "
TMP_LIST="$TMP_LIST\n${rank}_$i"
done
for SERVER in `echo -e $TMP_LIST | sort -r | cut -d_ -f2` ; do
GOOD_LIST="$GOOD_LIST $SERVER"
done
echo $GOOD_LIST
That will return the list of servers in the order:
10.0.0.53 10.0.0.54 10.0.0.55
Which is what I would expect at the moment, it of course changes.
Now here is where I get confused.
I checked the number of people logged into my three servers today
10.0.0.54 - 16
10.0.0.53 - 2
10.0.0.55 - 2
nc 10.0.0.53 9571 | grep rating | cut -d: -f2
92
nc 10.0.0.54 9571 | grep rating | cut -d: -f2
38
nc 10.0.0.55 9571 | grep rating | cut -d: -f2
86
So this script is working. This has been in place since Thursday of
last week and the users have all had to log out since then, They are
logged out nightly actually, but only one or two generally forgets to
logout when they leave. At that point the images should reload.
So why would the users get directed to mainly one server?
Is it that they are all getting their server list and ranking around the
same time so they get the same server even though at logon that server
is not the least loaded?
Is there a way I am not sure of here to make the script update on login?
Thank you.
Grant
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net