[GE users] starting flex-grid on boot

olesen Mark.Olesen at faurecia.com
Fri Mar 5 12:58:00 GMT 2010


On Fri, 2010-03-05 at 12:37 +0100, rems0 wrote:
> Hi list!
> 
> I have been trying to make flex-grid work on boot, it starts, but it
> does not change the complex values.
> 
> When I start it manually on the console it works.
> 
> I tried redirecting STDIN, STDOUT and STDERR on the start script,
> started with and without startproc, with and without a log file, etc.
> 
> Many tries but no luck.
> 
> What is the magic needed to start this perl script as a daemon on startup?

I've never tried anything like that, but I would instead recommend
starting it from a load sensor script on the qmaster. This is a neat way
to ensure that it only runs when the GridEngine is running.

Even if you starting it from a init.d script after GridEngine has
started, what happens if the GridEngine gets killed off or migrated to
another machine?


Note that load sensor is only re-read when it has been modified. You
could thus have the daemon mode as an invariant bit. Note that starting
with '-d' (daemon mode) will automatically kill any previously existing
qlicserver daemons.

Thus,
---------------
# start as daemon, terminate old processes
PATH/qlicserver -d

# kill off at exit
trap "PATH/qlicserver -d; exit 0" EXIT TERM INT

while :
do
    read input || exit 1         # wait for input
    [ "$input" = quit ] && exit 0

    echo begin                   # begin load report
    host_info                    # host information
    echo end                     # end load report

done
exit 0    # we never get here, but just in case
---------------


At first it may look like a kludge, but the load sensor approach
actually proves to be quite useful for adding arbitrary functions that
should run alongside GridEngine.


Note you'll probably have to attach at least on queue to the qmaster,
and make it an exec_host as well.  Even a dummy queue with zero slots
suffices. We however have a 'schedule' queue with 64 slots just for
miscellaneous housekeeping tasks.


/mark


DISCLAIMER:
This electronic transmission (and any attachments thereto) is intended solely for the use of the addressee(s). It may contain confidential or legally privileged information. If you are not the intended recipient of this message, you must delete it immediately and notify the sender. Any unauthorized use or disclosure of this message is strictly prohibited. Faurecia does not guarantee the integrity of this transmission and shall therefore never be liable if the message is altered or falsified nor for any virus, interception or damage to your system.

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=247187

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list