Thursday, November 13, 2008

Removing Ignition Kill Alarm

Network Storage Link for USB 2.0 Disk Drives [NSLU2]



body, html, div {scrollbar-face-color: black; scrollbar-highlight-color: black; scrollbar-shadow-color: light gray;
scrollbar-3dlight-color: black; scrollbar-arrow-color: lightgrey; scrollbar-shadow-color: black; scrollbar-base-color: black; scrollbar-track-color: lightgrey;} uuid
I trust principle not any guis that are served with a few check boxes, and you've got an energy-saving plan!? [Start - Settings - Control Panel - Power options - ...]! no, I want my art to control when and how to go to sleep my htpc. The following Perl script that runs every 5 minutes under the control of the vista task scheduler is doing just that.
the script there are simply here to download [click on graphic!]

perl script [s3_now.txt] should be renamed to [s3_now.pl]



part 1 of the script initialization of the script, win32:: mutex is loaded to a certain option is kept open other scripts to run in parallel. tlist.exe to check that run processes, ehrec.exe [runs a picture], ehshell.exe [vmc shell active], and of course a shutdown command. there is the unc-share \\ \\ nwal001 \\ ... so here override parameter. nwal001 is a linksys with nslu OpenSlug os.


  • part 2 of the script [logic]
  • line 44: is a mutex named 'backup_active' set [! Another script, which backs up files and long runs should not be left to sleep of course], line 49: here is controlled manually, if for some reason, no sleep is desired, and if they [row 55] Please do not sleep, but shut down [shutdown / r / f]. otherwise as usual once a netstat command to see if a deposed client [xbox360] is perhaps connected.


part 3 of the script [logic]

no client connected [else branch line 80] examine whether other factors apply, so no hibernation laufen soll, wie z.b. - läuft vielleicht mce local, oder wird gerade aufgenommen? trifft dies alles nicht zu, bitte schlafen gehen! [zeile 98 mit shutdown.exe /h /f !...]

teil 4 des scriptes [subroutine]

hier wird lediglich ein rotierendes log file initialisiert [log4perl], wohin stdout bzw. stderr wandern und housekeeping gewährleistet ist.



hier script downloader

denkbar einfach, doch letzten endes entscheide nur ich, wann der rechner wirklich schlafen geht, ausserdem ist dieses script beliebig erweiterbar!



0 comments:

Post a Comment