[K12OSN] How can I force ltsp clients to power off?

Patrick Fleming k12ltsp at rwcinc.net
Sun May 29 15:11:45 UTC 2011


I had to do all of the following to get my workstations to shutdown on a
schedule. Mine shutdown overnight, you may want to shutdown earlier and
may need to get some different input so that the machine will do this
based on idle time not time of day. I only have a few workstations so I
just run workstation 1 through 10. I'm running LTSP 4.2 on CentOS
version 5.5 and this works for me. ltspinfo is from ltsp-utils-0.25-4.fc6


lts.conf

 ALLOW_SHUTDOWN = Y



Cron job
06 0 * * *  root /usr/local/bin/ws-shutdown


/usr/local/bin/ws-shutdown
!/bin/bash
START=2
END=10
for i in `seq ${START} ${END}`; do

/usr/bin/ltspinfo --host=192.168.1.${i} --shutdown &>/dev/null
sleep 20
done




On 05/29/11 07:46, Jim Kinney wrote:
> shutdown -h now from a cron job on the server that's run on each client. The
> server should have ssh keys installed for root onto the clients so it's
> pretty easy to script up a shutdown process.
> 
> Alternatively, add a cronjob in the /etc/crontab for the clients that shuts
> down daily at say, 8 pm. But then you must have time synched properly.
> 
> On Sun, May 29, 2011 at 10:36 AM, Phydeaux <reb at taco.com> wrote:
> 
>> Hi!
>>
>> After spending a couple of hours cleaning the dust out of our client
>> machines
>> and reading the discussions here about power savings, it occurs to me that
>> I'm missing something.  Despite my encouraging both students and teachers
>> to
>> turn off our client machines at the end of each day, nothing is ever turned
>> off.
>>
>> How can I force our ltsp client machines to power off?  I'm happy to pick a
>> timeframe of two or three hours of inactivity. At that point I don't really
>> care what the machine is doing -- I just want it off.  I would imagine that
>> there is some way to set this within the client image (not that I care
>> where it is set).  I've done some digging and have not found any way of
>> doing this, though.
>>
>> We're running ltsp5 on Fedora 13, if it matters.
>>
>> Help!
>>
>> reb
>>
>>
>> _______________________________________________
>> K12OSN mailing list
>> K12OSN at redhat.com
>> https://www.redhat.com/mailman/listinfo/k12osn
>> For more info see <http://www.k12os.org>
>>
> 
> 
> 
> 
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>




More information about the K12OSN mailing list