[K12OSN] Auto shutdown certain clients
Steven at SimplyCircus.com
Thu Apr 15 21:33:37 UTC 2010
Could you script a screen saver to create a file when it turns on, and
delete it when it the screen saver turns off? If you can do this, then all
you have to do is have your cron job scan that file, and then compare that
time stamp with the current time. If the file doesn't exist, the computer
is in use, and the cron script should exit. If the difference is less than
X, the computer may still be used and then exit your cron script. If the
difference is equal to or more than X, its been on too long, shut down the
Director, Simply Circus, Inc.
Email: Steven at SimplyCircus.com
Mail: 14 Pierrepont Road
Newton, MA 02462
> -----Original Message-----
> From: k12osn-bounces at redhat.com [mailto:k12osn-bounces at redhat.com] On
> Behalf Of Jeff Siddall
> Sent: Thursday, April 15, 2010 4:12 PM
> To: Support list for open source software in schools.
> Subject: Re: [K12OSN] Auto shutdown certain clients
> On 04/14/2010 08:18 PM, Barry Cisna wrote:
> > Jeff,
> > I am not sure how you would ever devise a script to 'best guess' the
> > correct time to shut down a 'sitting idle' tc? In regards to
> > an ip per tc,this way you can track what tc's you want to in fact
> > down.
> > Here is the example shown in the link i posted. Like you said this
> > be only good for an daily occuring at xx-time,so may not be of any
> > for your needs.
> > ltspinfo --shutdown -h ltsp040
> > -run the above as a scheduled cron at hour x / days -1,2,3,etc-
> > (If you wanted multiple ip's in one scheduled cron simply
> > "ltsp040,ltsp041,ltsp042") #double quotes with comma separated
> > This would *not* shut down all clients.
> > Barry
> Yes, I understand this solution but it does not solve my problem
> it happens at a specific time. What I am looking for is something that
> shuts down the TC some amount of time (ex: 12 hours) after it was
> turned on.
> K12OSN mailing list
> K12OSN at redhat.com
> For more info see <http://www.k12os.org>
More information about the K12OSN