Ganglia installation and configuration
From Research Computing
| Table of contents |
The best install information is @
${ganglia_dir}/README
Google
http://ganglia.sourceforge.net
Instalation/configuration/start on a single node
Download the latest source version of Ganglia (extention .tar.gz ) from SourceForge website. Execute the following sequence of commands as normal user:
gzip -d ganglia-3.0.1.tar.gz tar xf ganglia-3.0.1.tar
After this do:
cd ganglia-3.0.1 ./configure make
Note: On the head node configure has to be executed with option
./configure --with-gmetad
This option uses rrdtool by default the dependent files are in:
/usr/include/rrd.h /usr/lib/librrd.a
If you do not have them on the default place use:
./configure CFLAGS="-I/rrd/header/path" \
CPPFLAGS="-I/rrd/header/path" \
LDFLAGS="-L/rrd/library/path" --with-gmetad
Whe using gmetad make sure you have directory
/var/lib/ganglia/rrds
owned by "nobody"
For more info look at README
At the end as "su" or "sudo" user execute
make install
Ganglia 3.0.1 uses new style of configuration script. The old one has to be converted by running:
/usr/sbin/gmond --convert /etc/gmond.conf > /etc/gmond.conf.new mv /etc/gmond.conf /etc/gmond.conf.old mv /etc/gmond.conf.new /etc/gmond.conf
Saving the old one is just for our backup.
Ganglia can be run with:
/etc/rc.d/init.d/gmond stop /etc/rc.d/init.d/gmond start
It is also possible to install ganglia from rpm source package. For a particula version on a host as root run:
rpmbuild --rebuild ganglia-3.0.1-1.src.rpm rpm -U /usr/src/redhat/RPMS/i386/ganglia-gmetad-3.0.1-1.i386.rpm
and if it is the head node:
rpm -U /usr/src/redhat/RPMS/i386/ganglia-gmetad-3.0.1-1.i386.rpm
There may be issues with some dependancies but they have to be resolved on the spot.
Instalation/configuration/run on some/all cluster nods
Use the following scripts or write on your own. It expects the package to be only in .tar format:
#!/bin/sh
PATH_TO=/tmp
SCRIPT_PATH=$HOME/scripts/onCluster/install
FILE_TYPE=install.tar
LOCAL_NET=192.168.0 # depends on the cluster IP addressing
#
#
for ((i= start_node_number; i < end_node_number ; ++i))
do
rcp $1.tar $LOCAL_NET.$i:$PATH_TO
rcp $SCRIPT_PATH/$FILE_TYPE $LOCAL_NET.$i:$PATH_TO
rsh $LOCAL_NET.$i "$PATH_TO/$FILE_TYPE $PATH_TO $1"
rsh $LOCAL_NET.$i "rm -f $PATH_TO/$FILE_TYPE"
done
The above script uses install.tar. Here .tar is just a part of the name of the file:
#! /bin/bash # this script assumes to be in the same directory # where the instalasion package is residing # cd $1 tar xf $2.tar cd $2 ./configure make make install # clean cd .. rm -rf $1/$2 rm -f $1/$2.tar # # specific configuration for Ganglia # /usr/sbin/gmond --convert /etc/gmond.conf > /etc/gmond.conf.new mv /etc/gmond.conf /etc/gmond.conf.old mv /etc/gmond.conf.new /etc/gmond.conf /etc/rc.d/init.d/gmond start
Only on the head node of the cluster
You have to run
/etc/rc.d/init.d/gmetad start
If you get an error associated somehow with
undefined symbol: PL_sv_undef
Do the rpm source package install. Donload the Ganglia-package.src.rpm and as root execute
rpmbuild --rebuild ganglia-3.0.1-1.src.rpm rpm -U /usr/src/redhat/RPMS/i386/ganglia-gmetad-3.0.1-1.i386.rpm rpm -U /usr/src/redhat/RPMS/i386/ganglia-gmond-3.0.1-1.i386.rpm
If you see an complain about rrd.h you may have to create a soft link from /usr/local to current location of this file. An example (with an imaginary dir ) on a cluster would be
ln -s /usr/local/rrdtool-1.0.37/include/rrd.h /usr/include/rrd.h
