Ganglia Installation for a cluster (HA, LB, HPC)
Ganglia is monitring system for high performance computing systems
We have two node potter.isb.ots.com and harry.isb.ots.com both are HPC nodes.
For HPC installation
http://www.wbitt.com/contributed-howtos/107-linux-high-performance-computing-cluster-how-to.html
Download Ganglia Package
[root@potter ~]# wget http://downloads.sourceforge.net/project/ganglia/ganglia%20monitoring%20core/3.1.2%20%28Langley%29/ganglia-3.1.2.tar.gz?use_mirror=nchc
[root@potter ~]# cd tmp/
[root@potter tmp]# tar zxvf ganglia-3.1.2.tar.gz
ganglia-3.1.2/
ganglia-3.1.2/build/
ganglia-3.1.2/build/config.guess
ganglia-3.1.2/build/config.sub
ganglia-3.1.2/build/depcomp
[root@potter tmp]# cd ganglia-3.1.2
[root@potter ganglia-3.1.2]# whereis python
python: /usr/bin/python2.5 /usr/bin/python2.5-config /usr/bin/python /usr/lib/python2.5 /usr/include/python2.5 /usr/share/man/man1/python.1.gz
[root@potter ganglia-3.1.2]# ./configure --with-python=/usr/bin/python2.5 --with-gmetad --enable-status
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux
checking host system type... i686-pc-linux
checking for gcc... gcc
checking for C compiler default output file name... a.out
⚠️ERROR⚠️
checking rrd.h presence... no
checking for rrd.h... no
checking for rrd\_create in -lrrd... no
Trying harder by including the X library path
checking for rrd\_create in -lrrd... no
RRDTOOLs required
[root@potter tmp]# yum install rrdtool*
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package rrdtool-1.3.8-1.fc10.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package rrdtool-php.i386 0:1.3.8-1.fc10 set to be updated
---> Package rrdtool-ruby.i386 0:1.3.8-1.fc10 set to be updated
--> Processing Dependency: ruby(abi) = 1.8 for package: rrdtool-ruby
--> Processing Dependency: libruby.so.1.8 for package: rrdtool-ruby
---> Package rrdtool-devel.i386 0:1.3.8-1.fc10 set to be updated
---> Package rrdtool-python.i386 0:1.3.8-1.fc10 set to be updated
---> Package rrdtool-tcl.i386 0:1.3.8-1.fc10 set to be updated
--> Processing Dependency: tcl >= 8.0 for package: rrdtool-tcl
---> Package rrdtool-doc.i386 0:1.3.8-1.fc10 set to be updated
---> Package rrdtool-perl.i386 0:1.3.8-1.fc10 set to be updated
--> Running transaction check
---> Package tcl.i386 1:8.5.3-1.fc10 set to be updated
---> Package ruby-libs.i386 0:1.8.6.287-2.fc10 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
Package Arch Version Repository Size
Installing:
rrdtool-devel i386 1.3.8-1.fc10 updates 27 k
rrdtool-doc i386 1.3.8-1.fc10 updates 237 k
rrdtool-perl i386 1.3.8-1.fc10 updates 39 k
rrdtool-php i386 1.3.8-1.fc10 updates 24 k
rrdtool-python i386 1.3.8-1.fc10 updates 27 k
rrdtool-ruby i386 1.3.8-1.fc10 updates 17 k
rrdtool-tcl i386 1.3.8-1.fc10 updates 20 k
Installing for dependencies:
ruby-libs i386 1.8.6.287-2.fc10 fedora 1.7 M
tcl i386 1:8.5.3-1.fc10 fedora 2.2 M
Transaction Summary
Install 9 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 4.3 M
Is this ok [y/N]: y
Downloading Packages:
Again configure ganglia
[root@potter ganglia-3.1.2]# ./configure --with-python=/usr/bin/python2.5 --with-gmetad --enable-status
The ganglia graphs are created using RRDTool (<http://www.rrdtool.org/>)
Checking for python
checking Python version... 2.5
checking Python support... yes
Checking for apr
checking for apr-1-config... /usr/bin/apr-1-config
checking for apr_socket_send in -lapr-1... yes
The ganglia utilities use the Apache Portable Runtime functions (<http://www.apache.org/>)
Found a suitable libapr1 library
Checking for confuse
checking for cfg_parse in -lconfuse... no
Trying harder including gettext
checking for cfg_parse in -lconfuse... no
Trying harder including iconv
checking for cfg_parse in -lconfuse... no
libconfuse not found
########### Again error ok rrdtools installed now libconfuse required
[root@potter ~]# yum install libconfuse*
Package Arch Version Repository Size
Installing:
libconfuse i386 2.6-1.fc9 fedora 86 k
libconfuse-devel i386 2.6-1.fc9 fedora 15 k
[root@potter ganglia-3.1.2]# ./configure --with-python=/usr/bin/python2.5 --with-gmetad --enable-status
config.status: creating config.h
config.status: executing depfiles commands
Welcome to..
______ ___
/ ____/___ _____ ____ _/ (_)___ _
/ / __/ __ `/ __ \/ __ `/ / / __ `/
/ /_/ / /_/ / / / / /_/ / / / /_/ /
\____/\__,_/_/ /_/\__, /_/_/\__,_/
/____/
Copyright (c) 2005 University of California, Berkeley
[root@potter ganglia-3.1.2]# make
make all-recursive
make[1]: Entering directory `/tmp/ganglia-3.1.2'
Making all in lib
make[2]: Entering directory `/tmp/ganglia-3.1.2/lib'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/apr-1 -I.. -I. -I../include/ -D_LARGEFILE64_SOURCE -g -O2 -fno-strict-aliasing -Wall -D_REENTRANT -MT getopt1.o -MD -MP -MF ".deps/getopt1.Tpo" -c -o getopt1.o getopt1.c;
then mv -f ".deps/getopt1.Tpo" ".deps/getopt1.Po"; else rm -f ".deps/getopt1.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/apr-1 -I.. -I. -I../include/ -D_LARGEFILE64_SOURCE -g -O2 -fno-strict-aliasing -Wall -D_REENTRANT -MT getopt.o -MD -MP -MF ".deps/getopt.Tpo" -c -o getopt.o getopt.c;
[root@potter ganglia-3.1.2]# echo $?
0
######## No error make successful
######### now make install
[root@potter ganglia-3.1.2]# make install
Making install in lib
make[1]: Entering directory `/tmp/ganglia-3.1.2/lib'
make[2]: Entering directory `/tmp/ganglia-3.1.2/lib'
test -z "/usr/lib" || mkdir -p -- "/usr/lib"
####### Gnaglia installed successfully
########### Now start configuration
######### copy web dir and services from ganglia
[root@potter ganglia-3.1.2]# cp -a web /var/www/html/ganglia/
[root@potter ganglia-3.1.2]# cp gmetad/gmetad.init /etc/rc.d/init.d/gmetad
[root@potter ganglia-3.1.2]# mkdir /etc/ganglia
[root@potter ganglia-3.1.2]# cp gmetad/gmetad.conf /etc/ganglia/
[root@potter ganglia-3.1.2]# mkdir -p /var/lib/ganglia/rrds
[root@potter ganglia-3.1.2]# chown nobody:nobody /var/lib/ganglia/rrds
[root@potter ganglia-3.1.2]# chkconfig --add gmetad
[root@potter ganglia-3.1.2]# chkconfig --add gmond
error reading information on service gmond: No such file or directory
[root@potter ganglia-3.1.2]# cp gm
gmetad/ gmetric/ gmond/
[root@potter ganglia-3.1.2]# cp gmond/gmond.init
gmond.init gmond.init.SuSE
[root@potter ganglia-3.1.2]# cp gmond/gmond.init /etc/rc.d/init.d/gmond
############ Open configuration file and edit the following lines
[root@potter ganglia-3.1.2]# vi /etc/ganglia/gmetad.conf
cluster {
name = "Beowulf"
owner = "Asim Abbas"
latlong = "unspecified"
url = "unspecified"
}
######### Add the line under modules section
module {
name = "python_module"
path = "modpython.so"
params = "/usr/lib/ganglia/" #####change your lib path depand on system arch
}
######## Start services
[root@potter ganglia]# /etc/init.d/gmond start
Starting GANGLIA gmond: [ OK ]
[root@potter ganglia]# /etc/init.d/gm
gmetad gmond
[root@potter ganglia]# /etc/init.d/gmetad start
Starting GANGLIA gmetad: [ OK ]
[root@potter ganglia]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [ OK ]
[root@potter ganglia]# ps aux |grep http
root 11347 0.1 4.6 32944 11732 ? Ss 07:29 0:00 /usr/sbin/httpd
apache 11349 0.0 2.1 33076 5356 ? S 07:29 0:00 /usr/sbin/httpd
apache 11350 0.0 2.1 33076 5352 ? S 07:29 0:00 /usr/sbin/httpd
apache 11351 0.0 2.1 33076 5352 ? S 07:29 0:00 /usr/sbin/httpd
apache 11352 0.0 2.1 33076 5352 ? S 07:29 0:00 /usr/sbin/httpd
apache 11353 0.0 2.1 33076 5352 ? S 07:29 0:00 /usr/sbin/httpd
apache 11354 0.0 2.1 33076 5352 ? S 07:29 0:00 /usr/sbin/httpd
apache 11355 0.0 2.1 33076 5352 ? S 07:29 0:00 /usr/sbin/httpd
apache 11356 0.0 2.1 33076 5352 ? S 07:29 0:00 /usr/sbin/httpd
######### Open browser http://localhost/ganglia “This external link will open in a new window”
#ganglia1.png
##### Click on potter.isb.ots.com
#ganglia2.png
######### Ok one node “potter.isb.ots.com” added successfully
######### Now we add second HPC node “Harry.isb.ots.com”
####### Simply copy the files from potter.isb.ots.com to harry.isb.ots.com
[root@potter cluster]# scp /usr/sbin/gmond harry:/usr/sbin/gmond
gmond 100% 126KB 125.8KB/s 00:00
[root@potter cluster]# scp /etc/ganglia/gmond.conf harry:/etc/ganglia/
gmond.conf 100% 7563 7.4KB/s 00:00
[root@potter cluster]# scp /etc/init.d/gmond harry:/etc/init.d/
gmond 100% 742 0.7KB/s 00:00
[root@potter cluster]# scp /usr/lib/libganglia-3.1.2.so.0
libganglia-3.1.2.so.0 libganglia-3.1.2.so.0.0.0
[root@potter cluster]# scp /usr/lib/libganglia-3.1.2.so.0 harry:/usr/lib
libganglia-3.1.2.so.0 100% 193KB 193.2KB/s 00:00
[root@potter cluster]# scp /usr/lib/libconfuse.so.0 harry:/usr/lib
libconfuse.so.0 100% 43KB 43.5KB/s 00:00
[root@potter cluster]# scp /usr/lib/libapr-1.so.0 harry:/usr/lib
libapr-1.so.0 100% 173KB 172.8KB/s 00:00
[root@potter cluster]# scp -r /usr/lib/ganglia/ harry:/usr/lib
moddisk.so 100% 128KB 127.5KB/s 00:00
modsys.so 100% 128KB 128.1KB/s 00:00
modpython.so 100% 42KB 42.4KB/s 00:00
modproc.so 100% 127KB 127.4KB/s 00:00
modgstatus.so 100% 12KB 12.0KB/s 00:00
modnet.so 100% 128KB 127.7KB/s 00:00
modload.so 100% 127KB 127.5KB/s 00:00
modmulticpu.so 100% 40KB 39.7KB/s 00:00
modcpu.so 100% 132KB 132.0KB/s 00:00
modmem.so 100% 128KB 128.3KB/s 00:00
####### Start gmond service on 2nd HPC node “harry.isb.ots.com and refresh the browser 3 or 4 time”
[root@harry ~]# /etc/init.d/gmond start
Starting GANGLIA gmond: [ OK ]
You have new mail in /var/spool/mail/root
#ganglia3.png
#ganglia4.png
#ganglia5.png