[GE users] [GE dev] Load sensor scripts

Dev dev_hyd2001 at yahoo.com
Wed Aug 18 09:19:11 BST 2004


Hi,

    Ok Now I got the script to report the ge_load
value to the qmaster. The problem was with the my_host
in the script file. It was not providing the whole
hostname with which the qmaster recognized the execd
running on the machine. Now the second part of my
problem.

Is there any easy way to get the load values of each
execd from the qmaster or is the only way writing GDI
code to access the values directly from the qmaster-

cheers,

Dev


--- Magnus_S?derberg <magnus.soderberg at switchcore.com>
wrote:

> Hej.
> 
> Although I don't know if it may contribute to your
> problem, it might be a good idea to 
> move the calculation of the load value to the start
> of the script, then wait for input and 
> return the value. The reason is that the script
> might be too slow to work with SGE otherwise.
> Checking the number of logins shouldn't be a big
> deal of course, but I had a problem with 
> a perl-script checking for license consumption on a
> FlexLM server. It worked perfectly 
> when I ran it manually to check, but failed when SGE
> ran it because of the delay when 
> parsing FLexLM output.
> Took me a while to figure out.
> 
> Dev wrote:
> ...
> >>>This is what I have done
> >>>
> >>>created a shell script
> >>>
> >>>####!/bin/sh
> >>>
> >>>myhost=`uname -n`
> >>>
> >>>while [ 1 ]; do
> >>>    # wait for input
> >>>    read input
> >>>    result=$?
> >>>    if [ $result != 0 ]; then
> >>>         exit 1
> >>>    fi
> >>>    if [ $input = "quit" ]; then
> >>>         exit 0
> >>>    fi
> >>>    #send users logged in
> >>>    logins=`who -q | tail -1 | cut -d = -f 2`   
> <<--- move this line up
> >>>    echo begin
> >>>    echo "$myhost:ge_load:$logins"
> >>>    echo end
> >>>done
> >>>
> >>># we never get here
> >>>
> >>>exit 0
> >>>
> 
> regards
> 
> Magnus S?derberg, M.Sc.E.E.
> Staff Engineer
> SwitchCore AB        Phone +46 46 2702560
> Emdalav?gen 18       Fax   +46 46 2702581
> SE-223 69 Lund, Sweden
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail:
> users-help at gridengine.sunsource.net
> 
> 



		
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now. 
http://messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list