User Tools

Site Tools


aix:lpar2rrd

LPAR2RRD

This is a tool easy to use because it collect statistics on one single point, the HMC and/or IVM.

Source packages

http://www.lpar2rrd.com/

Missing rpm in the list:

perl-Env

http://www.perzl.org/aix/

Install RPM packages

# What I basically install on AIX server
rpm -Uhv bash-4.2-10.aix5.1.ppc.rpm
rpm -Uhv lsof-4.86-1.aix7.1.ppc.rpm
rpm -Uhv gettext-0.10.40-8.aix5.2.ppc.rpm
rpm -Uhv popt-1.16-1.aix5.1.ppc.rpm
rpm -Uhv info-4.13a-2.aix5.1.ppc.rpm
rpm -Uhv gmp-5.0.5-1.aix5.1.ppc.rpm
rpm -Uhv coreutils-8.18-1.aix5.1.ppc.rpm
rpm -Uhv logrotate-3.8.2-1.aix5.1.ppc.rpm
rpm -Uhv rsync-3.0.9-1.aix5.1.ppc.rpm
rpm -Uhv tar-1.26-1.aix5.1.ppc.rpm
rpm -Uhv bzip2-1.0.6-1.aix5.1.ppc.rpm
rpm -Uhv zip-3.0-1.aix5.1.ppc.rpm
rpm -Uhv unzip-6.0-2.aix5.1.ppc.rpm
rpm -Uhv zlib-1.2.7-2.aix5.1.ppc.rpm
rpm -Uhv libjpeg-8d-1.aix5.1.ppc.rpm
rpm -Uhv tightvnc-server-1.3.10-2.aix5.1.ppc.rpm

# packages needed for http server
rpm -Uhv apr-1.4.6-1.aix5.2.ppc.rpm
rpm -Uhv expat-2.1.0-1.aix5.1.ppc.rpm
rpm -Uhv libiconv-1.14-2.aix5.1.ppc.rpm
rpm -Uhv apr-util-1.5.1-1.aix5.1.ppc.rpm
rpm -Uhv openssl-1.0.1e-1.aix5.1.ppc.rpm
rpm -Uhv db4-4.7.25-2.aix5.1.ppc.rpm
rpm -Uhv readline-6.2-4.aix5.1.ppc.rpm
rpm -Uhv pcre-8.32-1.aix5.1.ppc.rpm
rpm -Uhv openldap-2.4.23-0.3.aix5.1.ppc.rpm
rpm -Uhv apr-util-ldap-1.5.1-1.aix5.1.ppc.rpm
rpm -Uhv httpd-2.4.4-1.aix5.1.ppc.rpm

# for rrdtool 1.4
rpm -Uhv freetype2-2.4.11-1.aix5.1.ppc.rpm
rpm -Uhv libdatrie-0.2.4-1.aix5.1.ppc.rpm
rpm -Uhv libthai-0.1.18-1.aix5.1.ppc.rpm
rpm -Uhv libXrender-0.9.7-2.aix6.1.ppc.rpm
rpm -Uhv fontconfig-2.8.0-2.aix5.1.ppc.rpm
rpm -Uhv libgcc-4.7.2-1.aix7.1.ppc.rpm
rpm -Uhv libffi-3.0.11-2.aix5.1.ppc.rpm
rpm -Uhv glib2-2.30.3-2.aix5.1.ppc.rpm
rpm -Uhv libpng-1.5.14-1.aix5.1.ppc.rpm
rpm -Uhv libxcb-1.7-1.aix5.1.ppc.rpm
rpm -Uhv xz-libs-5.0.4-1.aix5.1.ppc.rpm
rpm -Uhv libxml2-2.9.0-1.aix5.1.ppc.rpm
rpm -Uhv libcroco-0.6.5-1.aix5.1.ppc.rpm
rpm -Uhv libart_lgpl-2.3.21-1.aix5.1.ppc.rpm
rpm -Uhv lzo-2.06-1.aix5.1.ppc.rpm
rpm -Uhv pixman-0.28.2-1.aix5.1.ppc.rpm
rpm -Uhv atk-1.32.0-1.aix5.1.ppc.rpm
rpm -Uhv jasper-1.900.1-2.aix5.1.ppc.rpm
rpm -Uhv jbigkit-libs-2.0-2.aix5.1.ppc.rpm
rpm -Uhv libtiff-4.0.3-1.aix5.1.ppc.rpm
rpm --nodeps -Uhv gtk2-2.20.1-2.aix5.1.ppc.rpm
rpm --nodeps -Uhv librsvg2-2.34.2-1.aix5.1.ppc.rpm
rpm -Uhv cairo-1.12.14-1.aix5.1.ppc.rpm
rpm -Uhv pango-1.24.5-1.aix5.1.ppc.rpm
rpm -Uhv gtk2-immodules-2.20.1-2.aix5.1.ppc.rpm
rpm -Uhv libdbi-0.8.4-1.aix5.1.ppc.rpm
rpm -Uhv dejavu-sans-mono-fonts-2.33-1.aix5.1.noarch.rpm
rpm -Uhv dejavu-lgc-sans-mono-fonts-2.33-1.aix5.1.noarch.rpm
rpm -Uhv rrdtool-1.4.7-2.aix5.1.ppc.rpm

# RRDtool with perl (for LPAR2RRD)
rpm -Uhv gdbm-1.10-1.aix5.1.ppc.rpm
rpm -Uhv perl-5.8.8-2.aix5.1.ppc.rpm
rpm -Uhv rrdtool-perl-1.4.7-2.aix5.1.ppc.rpm
rpm -Uhv perl-TimeDate-1.20-1.aix5.1.noarch.rpm

Create users

As root user:

mkuser id=500 lpar2rrd
echo "lpar2rrd:lpar2rrd" | chpasswd -c
chuser data=1048576 lpar2rrd
chuser stack=524288 lpar2rrd
chuser data=524288 apache
chuser stack=262144 apache

su - lpar2rrd
ssh-keygen -t dsa -b 1024
cp .ssh/id_dsa .ssh/realt_dsa
chown apache /home/lpar2rrd/.ssh/realt_dsa

mkdir /var/www/htdocs/lpar2rrd
chown -R lpar2rrd.staff /var/www/htdocs/lpar2rrd

HMC connection

On the HMC,create a user lpar2rrd and add the public key:

[lpar2rrd@monitor2]/home/lpar2rrd# cat .ssh/id_dsa.pub
ssh-dss AAAAB3NzaC1kc3MAAACBALvbupPL
nqy6UfJjgMG5SRnnFDfD013OtBxFv8P7qoHfGKCG0Vu2IhNCYttpYMmsMR+BWADo4c9oT7r92raLfVDjNW
8uO5C5fatK305+sNqazbT91HDDNDKQnbpoKUqybVRC2BQbPR8ESh+ws3uHdxXSQKwOSyrHO6Nwkkx8/h4T
AAAAFQDZgT9MxrEUQg4uOwxhciwwdoOO8QAAAIAH37x06Ia4FiCdlk3U9vuOI0QEvCKMXL+ZPFNoRcgiqi
CnR2WeiaG5qM+odYWk/F/owV0Y/DmkmrrjPrgDADjS1uKoSy+NMg803+4cS1B06EMtia+RmMbWkr+kQZ90
WvB8C5cxofzcllnQjztQxVrZnZPmMI73/SQdS7QBU9a9WwAAAIA3VAdMvP+ZO3zs57FaznMySoszxgNWxu
INlcP61TQuyuCp5Bq3mFXwxFwJWPpqpbW5yHj9N1+3pscSsFxEQb9YVvb1oL9c5QdPDnmXZK8BHHmNZ{{M
n+ftuzJKHgR2lynaxQ4hxTnz+xT0ywGwokeuuCnr4G3Bftc70Yn9vCNjuzGQ== lpar2rrd@p550-2
[lpar2rrd@monitor2]/home/lpar2rrd# ssh -l hscroot luhmc1
hscroot@luhmc1:~> mkhmcusr -u lpar2rrd -a hmcviewer --passwd abc1234
hscroot@luhmc1:~> mkauthkeys -u lpar2rrd -a 'ssh-dss AAAAB3NzaC1kc3MAAACBALvbupPL
nqy6UfJjgMG5SRnnFDfD013OtBxFv8P7qoHfGKCG0Vu2IhNCYttpYMmsMR+BWADo4c9oT7r92raLfVDjNW
8uO5C5fatK305+sNqazbT91HDDNDKQnbpoKUqybVRC2BQbPR8ESh+ws3uHdxXSQKwOSyrHO6Nwkkx8/h4T
AAAAFQDZgT9MxrEUQg4uOwxhciwwdoOO8QAAAIAH37x06Ia4FiCdlk3U9vuOI0QEvCKMXL+ZPFNoRcgiqi
CnR2WeiaG5qM+odYWk/F/owV0Y/DmkmrrjPrgDADjS1uKoSy+NMg803+4cS1B06EMtia+RmMbWkr+kQZ90
WvB8C5cxofzcllnQjztQxVrZnZPmMI73/SQdS7QBU9a9WwAAAIA3VAdMvP+ZO3zs57FaznMySoszxgNWxu
INlcP61TQuyuCp5Bq3mFXwxFwJWPpqpbW5yHj9N1+3pscSsFxEQb9YVvb1oL9c5QdPDnmXZK8BHHmNZ{{M
n+ftuzJKHgR2lynaxQ4hxTnz+xT0ywGwokeuuCnr4G3Bftc70Yn9vCNjuzGQ== lpar2rrd@p550-2'

Enable collect of statistics on the HMC:

hscroot@luhmc1:~> chlparutil -r config -s 60
hscroot@luhmc1:~> lslparutil -r config  -F name,sample_rate
PWR6A-9117-MMA-SN103A4B0,60
PWR6B-9117-MMA-SN103B5C0,60

As lpar2rrd:

[lpar2rrd@monitor2]/home/lpar2rrd# ssh luhmc1
Last login: Tue Mar 12 10:36:55 2013 from 192.168.222.155
lpar2rrd@luhmc1:~>

Install LPAR2rrd package

As lpar2rrd unpack and install the package:

tar xvf /mnt/monitoring/lpar2rrd-3.42.tar
cd lpar2rrd-3.42

[lpar2rrd@monitor2]/home/lpar2rrd/lpar2rrd-3.42# ./install.sh
LPAR2RRD installation under user : "lpar2rrd"
 make sure it is realy the user which should own it

Where LPAR2RRD will be installed [/home/lpar2rrd/lpar2rrd]:  /var/www/htdocs/lpar2rrd

Update config file

Update the configuration file, and check PATHs for PERL and PERL5LIB

# vi /var/www/htdocs/lpar2rrd/etc/lpar2rrd.cfg
update the variable 
HMC_LIST="luhmc1"
PERL5LIB=/opt/freeware/lib/perl/5.8.8:/opt/freeware/lib/perl5/site_perl/5.8.8:/opt/freeware/lib/perl5/vendor_perl/5.8.8
PERL=/opt/freeware/bin/perl

Test config

Test the configuration file:

[lpar2rrd@monitor2]/var/www/htdocs/lpar2rrd/bin# ./sample_rate.sh
Going to check HMC as user lpar2rrd, will ask for a password if there is not allowed automatic access
luhmc1:P55A-9133-55A-SN06C1B4G sample rate : 60, OK
luhmc1:P720-8202-E4B-SN06D457P sample rate : 60, OK
[lpar2rrd@monitor2]/var/www/htdocs/lpar2rrd# ./load.sh
LPAR2RRD free version 3.42
Host           : monitor2
HMC            : luhmc1
date start     : luhmc1 Tue Mar 26 10:08:02 2013
managed system : luhmc1:P55A-9133-55A-SN06C1B4G (type_model*serial : 9133-55A*06C1B4G)
HMC version    : luhmc1 77500
sample rate    : luhmc1:P55A-9133-55A-SN06C1B4G 60 seconds
last rec       : luhmc1:P55A-9133-55A-SN06C1B4G 03/26/2013 09:59:01 /var/www/htdocs/lpar2rrd/data/P55A-9133-55A-SN06C1B4G/luhmc1/last.txt
.............

Apache config

Create symbolic links: apachectl (start/stop apache), httpd -S : to test httpd.conf

mkdir /etc/httpd
ln -s /opt/freeware/etc/httpd/conf /etc/httpd/conf
ln -s /opt/freeware/sbin/apachectl /sbin/apachectl
ln -s /opt/freeware/sbin/httpd /sbin/httpd

Now edit http.conf:

vi /opt/freeware/etc/httpd/conf/httpd.conf

Check your apache configuration:

[root@monitor2]/root# /sbin/httpd -S
VirtualHost configuration:
ServerRoot: "/opt/freeware/etc/httpd"
Main DocumentRoot: "/var/www/htdocs"
Main ErrorLog: "/var/log/httpd/error_log"
Mutex default: dir="/var/logs/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex proxy-balancer-shm: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=64500
Group: name="staff" id=1

Start your web server

[root@monitor2]/root# /sbin/apachectl start

Test a connection:

http://monitor2/lpar2rrd/

Add an entry into lpar2rrd crontab (recheck every hour the LPARs definitions in case of change, support also LPAR mobility):

[lpar2rrd@monitor2]/home/lpar2rrd# crontab -e
0 * * * * /var/www/htdocs/lpar2rrd/load.sh > /var/www/htdocs/lpar2rrd/load.out 2>&1

Debug:

check missing components:

[lpar2rrd@lpar2rrd lpar2rrd]$ cd /home/lpar2rrd
[lpar2rrd@lpar2rrd lpar2rrd]$ . ./etc/lpar2rrd.cfg
[lpar2rrd@lpar2rrd lpar2rrd]$  perl bin/lpar2rrd-realt.pl
Can't locate Env.pm in @INC (@INC contains: /usr/lib64/perl5/vendor_perl /usr/lib64/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at bin/lpar2rrd-realt.pl line 20.
BEGIN failed--compilation aborted at bin/lpar2rrd-realt.pl line 20.

[root@lpar2rrd lpar2rrd]$ yum -y install perl-Env

[lpar2rrd@lpar2rrd lpar2rrd]$ perl bin/lpar2rrd-realt.pl
Content-type: text/html
Expires: Thu Oct 30 13:37:10 2014

<HTML><BODY BGCOLOR="#D3D2D2" TEXT="#000000" LINK="#0000FF" VLINK="#0000FF" ALINK="#FF0000" ><table align="center" summary="Graphs"><tr><td><img src="/lpar2rrd-cgi/real-time.sh?source=&hmc=&mname=&new_gui=0"></td>
<td valign="top"><font size=-1><A HREF="/lpar2rrd-cgi/lpar2rrd-realt.sh?source=&hmc=&mname=&new_gui=0&new_gui=0&none=">Refresh</A></font>
</td></tr>
</table><br>
<ul style="display: none"><li class="tabagent"></li></ul>
aix/lpar2rrd.txt · Last modified: 2014/10/30 16:18 by manu