:: Re: [DNG] Remote power management
Top Page
Delete this message
Reply to this message
Author: Arnt Karlsen
Date:  
To: dng
Subject: Re: [DNG] Remote power management
On Thu, 22 Jul 2021 10:10:16 +0100, fraser wrote in message
<20210722101016.5370801b@bay6-hi5-1>:

> Hi,
>
> This feels like a damnfool question, but I don't seem able to find an
> appropriate solution.
>
> The situation: careless staff leaving desktops logged on, open tabs in
> browsers, monitors left on etc.etc.
>
> First solution: cron job: '/sbin/shutdown -r now' run daily at 7pm


..and not e.g. '/sbin/shutdown -h -P "19:00 Shutdown at 7:00 pm!" '
in the morning? Would give your careless ones due warnings they
may heed or not at their own peril... man shutdown for details.

> But this reboots to a live console login (no dm installed) and I
> haven't yet found a way to remotely configure the power management;
> all the solutions seem to merge to one where X is already running (or
> eliminating human error!).
>
> The situation is complicated by the need to subsequently disable power
> management and screensaver so that online video (tutoring) doesn't get
> interrupted once X and xfce are manually launched. So here is my
> damnfool question:
>
> How can I manually turn any monitors off remotely if they are not
> running X? The computers are all running Chimaera.


..ssh in and chk, then kill etc as needed. Can be automated, just
needs ssh servers on all boxes, and some cronjob magic ambitions.

> Sorry for such an elementary question, but it's eluded me.


..if you control the building power, follow up your First solution by
cutting power at say 7:00:30pm, to kill off the rebooting desktops.
Dirty, yeah. ;o) Just restore building power the next mornings to
have your careful desktop riders welcome their live console logins.

--
..med vennlig hilsen = with Kind Regards from Arnt Karlsen
...with a number of polar bear hunters in his ancestry...
Scenarios always come in sets of three:
best case, worst case, and just in case.