[GE users] Setting Up A Load Sensor in Grid Engine

Olesen, Mark Mark.Olesen at emcontechnologies.com
Tue Apr 15 11:54:24 BST 2008


> Hi
> This is due to tmpspace.sh script contains:-
> 
> 
>    tmpfree=`echo $dfoutput | awk '{ print $4}'`//now I changed 4 to 3
>    tmptot=`echo $dfoutput | awk '{ print $2}'` //now I changed 2 to 1
>    tmpused=`echo $dfoutput | awk '{ print $3}'`//now I changed 3 to 2
> 
>  now I m getting the output if I run the script by hand .

BTW: to reduce the forking (on awk) you can simply use 'set' within a
function. For example,

# -----------------------------------------------------------------
# df_info
#
# echo the $1_{total,used,free} space on filesystem $2
#
# gridengine uses the suffixes
#   'k' => blocksize 1000
#   'K' => blocksize 1024
#
# return 0 if 'df' fails
df_info()
{
   # 1:tag 2:mount 3:filesys 4:total 5:Used 6:Avail 7:Used% 8:Mount
   [ -d "$2" ] && set -- $1 $2 $( df -k $2 2>/dev/null | tail -1 )

   ## we could add the following check:
   ## [ "$2" != "$8" ] && set -- $1 $2;        # mount point mismatch?

   [ "$#" -ge 6 ] || set -- $1 $2 filesystem 0 0 0

   echo "$UQHOST:$1_total:$4K"
   echo "$UQHOST:$1_used:$5K"
   echo "$UQHOST:$1_free:$6K"
}

In which UQHOST is the invariant unqualified hostname.
This function can be called directly within the load report cycle

HOST=$($SGE_utilbin/gethostname -aname)
UQHOST=$(echo $HOST | cut -f1 -d.)

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

   echo begin                   # begin load report
   df_info      tmp     /tmp
   echo end                     # end load report
done
exit 0                  # we never get here, but just in case



> But first of all why this load sensors are not up in execution nodes?

This is indeed an interesting question. Try adding something like this
to the script:

   echo "loadsensor on $(hostname) at $(date)" >> /tmp/loadsensor.log

To find out if the load sensor is being called at all.

I would also check that the hostname reported in the load sensor
actually matches with how GridEngine knows the host.  It will not work
if the loadsensor reports "host1" but is actually being called from
"host2".

/mark
This e-mail message and any attachments may contain 
legally privileged, confidential or proprietary Information, 
or information otherwise protected by law of EMCON 
Technologies, its affiliates, or third parties. This notice 
serves as marking of its ?Confidential? status as defined 
in any confidentiality agreements concerning the sender 
and recipient. If you are not the intended recipient(s), 
or the employee or agent responsible for delivery of this 
message to the intended recipient(s), you are hereby 
notified that any dissemination, distribution or copying 
of this e-mail message is strictly prohibited. 
If you have received this message in error, please 
immediately notify the sender and delete this e-mail 
message from your computer.


---------------------------------------------------------------------
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