[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Condor pool nodes using WOL



Hi,

David Wallom schrieb:
In order to satisfy the dual needs of a department we are trying to instigate a method of using Wake On Lan with Condor so that a small number of nodes stay up constantly to satisfy instantaneous demand but the rest of them are sleep able to be woken on demand... Has anyone else tried this? It would of course save massively on electricity etc.

I have realised that. I have made a small script that I call via cron to check if there are any jobs not running in the queue and in case there are jobs in need, I issue a WOL call.

Script attached.

Regards
Philipp

--
If you have problems in Windows: REBOOT
If you have problems in Linux:   BE ROOT
#!/bin/sh

# Copyright Philipp Kolmann, 2005
# kolmann@xxxxxxxxxxxxxxxx

# Wakes machines if there are condor jobs waiting.
# MacAddress List comes from lrb1. Possibility to specify a special host on the
# commandline

condor_q -xml | grep JobStatus
if [ "$?" = "1" ]
then
  exit 0
fi

if [ "x${1}" == "x" ] ; then
  finger -l pclist@lrb1 | grep CLU | awk -F: "{print(\$3)}" | \
  sed s/-/:/g | xargs wakeonlan
else
  finger -l pclist@lrb1 | grep CLU | grep ${1} | awk -F: "{print(\$3)}" | \
  sed s/-/:/g | xargs wakeonlan
fi