Thanks Mark! It is much better than reading the access time of
/dev/mouse method that I used to use ages ago!

Rayson



On Tue, Oct 2, 2012 at 1:21 PM, Bober, Mark <[email protected]> wrote:
> Nice! That's a lot cleaner than my hacked-up set of scripts. I'll try it
> as soon as I can.
>
> I noted your comment about /dev/input/mice not working  in zz_hibernate
> - here's how I did that part:
>
> This program; xidle.c:
>
> #include <stdio.h>
> #include <X11/extensions/scrnsaver.h>
> #include <X11/Xlib.h>
>
> main() {
>    XScreenSaverInfo *info = XScreenSaverAllocInfo();
>    Display *display = XOpenDisplay(0);
>
>    XScreenSaverQueryInfo(display, DefaultRootWindow(display), info);
>    printf("%u\n", info->idle);
> }
>
> That outputs X's idle time in milliseconds. To get connected to the
> running X session (my lab uses KDM right now):
>
> kdmauth=` ps -aef | egrep  "X.*var/run/kdm" |fgrep -v grep| awk '{print
> $16}'`
> xauth merge $kdmauth
> export DISPLAY=:0
>
> I then compare the result of xidle vs. the time I wanted the console to
> be idle.
>
> It's not the best of solutions, but it seems to work out OK in practice.
>
>
>
>
> Mark Bober
> Engineering IT
> Washingon University in St. Louis
>
>
>
>
> -----Original Message-----
> From: Orion Poplawski [mailto:[email protected]]
> Sent: Tuesday, October 2, 2012 11:53 AM
> To: [email protected]; [email protected]
> Subject: [Gridscheduler-users] Announce: gewake 1.1
>
> I'd like to announce gewake 1.1 at https://github.com/opoplawski/gewake
>
> Introduction
>
> gewake is a script developed at NorthWest Research Associates (NWRA) to
> allow machines to be shutdown when idle and automatically woken up when
> needed. It works pretty well for us, but there may be aspects of it that
> are specific to how we have Grid Engine setup locally.
>
> I'd love to know how it works for others.
>
> --
> Orion Poplawski
> Technical Manager                     303-415-9701 x222
> NWRA, Boulder Office                  FAX: 303-415-9702
> 3380 Mitchell Lane                       [email protected]
> Boulder, CO 80301                   http://www.nwra.com
>
> ------------------------------------------------------------------------
> ------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly what is
> happening inside your Ruby, Python, PHP, Java, and .NET app Try New
> Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Gridscheduler-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gridscheduler-users
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Gridscheduler-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gridscheduler-users
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to