Difference between revisions of "Using Ganglia As Load Sensor"

From GridWiki
Jump to: navigation, search
(minor updates)
Line 95: Line 95:
 
   
 
   
 
  done
 
  done
 +
 +
== Change Your Life Through the Art of Self Mastery ==
 +
 +
There is only one corner of the universe you can be certain of improving, and thats your own SELF. ~ Aldous HuxleyI will share with you today some of the things I shared recently with an audience of close to 100 people, a topic that is very dear to my heart the Art of SELF Mastery, what really means to be true to your SELF, and the inner peace, harmony, love and the inner power that comes from being your true SELF.
 +
 +
[[http://goodvillenews.com/Change-Your-Life-Through-the-Art-of-Self-Mastery-tEkVh3.html Change Your Life Through the Art of Self Mastery]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 +
== Refugee Turned Entrepreneur Uplifts Women Abroad ==
 +
 +
While some retailers have struggled in the recession, Amber Chand, an online retailer of items made by women living in war-torn countries, is experiencing success."As the economy was going into a downturn during the holiday season, which is my primary season, I noticed actually that my company was increasing in terms of sales and revenues, and we grew by 22 percent," says Chand.
 +
 +
[[http://goodvillenews.com/Refugee-Turned-Entrepreneur-Uplifts-Women-Abroad-w0ETyF.html Refugee Turned Entrepreneur Uplifts Women Abroad]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 +
== The Opposite Of Poverty Is Justice ==
 +
 +
 +
 +
[[http://goodvillenews.com/The-Opposite-Of-Poverty-Is-Justice-oqL04K.html The Opposite Of Poverty Is Justice]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 +
== Servant Leadership: Helping People Come Alive ==
 +
 +
"Its a powerful perspective on work -- holding within it a value for collaboration, agency, creativity, and meaning. What if we all could see what we do in that way? What if our organizations supported us in holding that perspective, and to go one step further, how can we create institutions that release these core values? In his seminal 1970 essay
 +
 +
[[http://goodvillenews.com/Servant-Leadership-Helping-People-Come-Alive-zqkEDB.html Servant Leadership: Helping People Come Alive]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 +
== New Toilet System Transform Waste into Electricity ==
 +
 +
Scientists from Nanyang Technological University (NTU) have invented a new toilet system that will turn human waste into electricity and fertilisers and also reduce the amount of water needed for flushing by up to 90 per cent compared to current toilet systems in Singapore.
 +
 +
[[http://goodvillenews.com/New-Toilet-System-Transform-Waste-into-Electricity-zvQBzk.html New Toilet System Transform Waste into Electricity]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

Revision as of 06:57, 13 August 2012

Many Grid Engine users have an implementation of Ganglia cluster monitoring system for their cluster/grid. The script at the bottom of the page is a load sensor that converts the XML output from Ganglia's gmond daemon into the format needed for a Grid Engine load sensor.

Most of the load parameters reported by gmond are duplicate content (though named differently) from those already available from Grid Engine. The major advantage is the extensible nature of Ganglia in terms of using their gmetric program.

  • Save the script at the bottom of the page to a directory accessible to your slave nodes.
  • Assign as load sensor script (if you want it for all nodes, use global in place of node01 below).
qconf -mconf node01
 ...
 load_sensor    /path/to/gmond_load_sensor.sh
 ...
  • Add a item to the complexes. The complex definition below is an example to report the os_release.
qconf -mc
 ...
 #name               shortcut      type        relop requestable consumable default  urgency
 #-------------------------------------------------------------------------------------------
 os_release          os_release    CSTRING     ==    YES         NO         NONE     0
 ...
  • Test
qhost -F os_release
 ...
 node01                  lx24-amd64      2  2.02    2.0M  254.7M    2.0M  144.0K
    Host Resource(s):      hl:os_release=2.6.9-11.ELsmp
 ...

Since our added complex is requestable, you can include in the job submission. For example: qsub -l os_release=2.6.9-11.ELsmp myjob.sh

gmond_load_sensor.sh

#!/bin/sh
#
# (c) 2007 Tim Cera

# GPLv2

# example for a load sensor script that uses gmond information from the ganglia
# project.

#
# Be careful: Load sensor scripts are started with root permissions.
# In an admin_user system euid=0 and uid=admin_user
#

# Change to the port configured in /etc/gmond.conf.  Ganglia default is 8649.
ganglia_port=8649

telnet=`which telnet`

PATH=/bin:/usr/bin

ARCH=`$SGE_ROOT/util/arch`
HOST=`$SGE_ROOT/utilbin/$ARCH/gethostname -name`

end=false
while [ $end = false ]; do

  # ----------------------------------------
  # wait for an input
  #
  read input
  result=$?
  if [ $result != 0 ]; then
     end=true
     break
  fi

  if [ "$input" = "quit" ]; then
     end=true
     break
  fi

  # ----------------------------------------
  # send mark for begin of load report
  echo "begin"
  xml2load=`$telnet localhost $ganglia_port 2> /dev/null | \
            sed \
                -e "/HOST.*${HOST}/,/HOST>/ ! d" \
                -e "s/^.*<METRIC NAME=\"/${HOST}:/g" \
                -e '/HOST/ d' \
                -e 's/" VAL="/:/g' \
                -e 's/" TYPE.*>//g' \
                `
  # Add whatever changes you need to coordinate with GridEngine
  # example
  #             -e 's/load_one/load_short/g' \
  # OR you can add the complex 'load_one'

  # ----------------------------------------
  # send load information
  for line in $xml2load
  do
    echo $line
  done

  # ----------------------------------------
  # send mark for end of load report
  echo "end"

done

Change Your Life Through the Art of Self Mastery

There is only one corner of the universe you can be certain of improving, and thats your own SELF. ~ Aldous HuxleyI will share with you today some of the things I shared recently with an audience of close to 100 people, a topic that is very dear to my heart the Art of SELF Mastery, what really means to be true to your SELF, and the inner peace, harmony, love and the inner power that comes from being your true SELF.

[Change Your Life Through the Art of Self Mastery]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

Refugee Turned Entrepreneur Uplifts Women Abroad

While some retailers have struggled in the recession, Amber Chand, an online retailer of items made by women living in war-torn countries, is experiencing success."As the economy was going into a downturn during the holiday season, which is my primary season, I noticed actually that my company was increasing in terms of sales and revenues, and we grew by 22 percent," says Chand.

[Refugee Turned Entrepreneur Uplifts Women Abroad]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

The Opposite Of Poverty Is Justice

[The Opposite Of Poverty Is Justice]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

Servant Leadership: Helping People Come Alive

"Its a powerful perspective on work -- holding within it a value for collaboration, agency, creativity, and meaning. What if we all could see what we do in that way? What if our organizations supported us in holding that perspective, and to go one step further, how can we create institutions that release these core values? In his seminal 1970 essay 
[Servant Leadership: Helping People Come Alive]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

New Toilet System Transform Waste into Electricity

Scientists from Nanyang Technological University (NTU) have invented a new toilet system that will turn human waste into electricity and fertilisers and also reduce the amount of water needed for flushing by up to 90 per cent compared to current toilet systems in Singapore.

[New Toilet System Transform Waste into Electricity]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]