IBM Power Systems Monitoring
Consider usage of our brand new full-stack infrastructure monitoring tool XorMon Next Generation as LPAR2RRD replacement.
It brings a new level of infrastructure monitoring by relying on a modern technology stack.
In particular, reporting, exporting, alerting and presentation capabilities are unique on the market.
$ perl /home/lpar2rrd/lpar2rrd/bin/conntest.pl 192.168.1.1 22 Connection to "192.168.1.1" on port "22" is ok
$ ssh hmc1 -l hscroot hscroot@hmc1:~> chlparutil -r config -s 60 hscroot@hmc1:~> lslparutil -r config -F name,sample_rate PWR6A-9117-MMA-SN103AXXX,60 PWR6B-9117-MMA-SN103BXXX,60
$ who am I lpar2rrd pts/0 Jan 10 10:13 (192.168.1.240) $ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/lpar2rrd/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: ...
$ cat /home/lpar2rrd/.ssh/id_rsa.pub 'ssh-rsa AAAAB3NzaC1kc3MAAACBALvbupPLnqy6UfJjgMG5SRnnFDfD013OtBxFv8P7qoHfGKCG0Vu2 IhNCYttpYMmsMR+BWADo4c9oT7r92raLfVDjNW8uO5C5fatK305+sNqazbT91HDDNDKQnbpoKUqybVRC2 BQbPR8ESh+ws3uHdxXSQKwOSyrHO6Nwkkx8/h4TAAAAFQDZgT9MxrEUQg4uOwxhciwwdoOO8QAAAIAH37 x06Ia4FiCdlk3U9vuOI0QEvCKMXL+ZPFNoRcgiqiCnR2WeiaG5qM+odYWk/F/owV0Y/DmkmrrjPrgDADj S1uKoSy+NMg803+4cS1B06EMtia+RmMbWkr+kQZ90WvB8C5cxofzcllnQjztQxVrZnZPmMI73/SQdS7QB U9a9WwAAAIA3VAdMvP+ZO3zs57FaznMySoszxgNWxuINlcP61TQuyuCp5Bq3mFXwxFwJWPpqpbW5yHj9N 1+3pscSsFxEQb9YVvb1oL9c5QdPDnmXZK8BHHmNZMn+ftuzJKHgR2lynaxQ4hxTnz+xT0ywGwokeuuCnr 4G3Bftc70Yn9vCNjuzGQ== lpar2rrd@p550-2'
$ ssh -l hscroot hmc1 hscroot@hmc1:~> mkhmcusr -u lpar2rrd -a hmcviewer --passwd abc1234
hscroot@hmc1:~> mkauthkeys -u lpar2rrd -a 'ssh-rsa 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'
$ ssh -l lpar2rrd hmc1 password: lpar2rrd@hmc1:~> ls -l .ssh/authorized_keys2 ls: cannot access .ssh/authorized_keys2: No such file or directory lpar2rrd@hmc1:~> mkauthkeys -a 'ssh-rsa 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'
$ ssh -l sysadmin smdc1 sysadmin@sdmc:~> smcli mkuser -u lpar2rrd -g smmon -p abc1234 sysadmin@sdmc:~> smcli chuser -u lpar2rrd -e expire 9999 # do not let it expire sysadmin@sdmc:~> mkauthkeys -u lpar2rrd -a 'ssh-rsa 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'
$ ssh -l lpar2rrd hmc1 The authenticity of host 'hmc1 (9.138.236.97)' can′t be established. RSA key fingerprint is 97:e1:a5:c2:58:3c:c6:0c:d1:6f:4d:6e:62:9c:68:4b. Are you sure you want to continue connecting (yes/no)? yes lpar2rrd@hmc1:~>
$ ssh-keygen -i -f your-ssh2.pub > your-openssh.pub
$ ps -ef|egrep "apache|httpd"|grep -v grep|awk '{print $1}'|grep -v "root"|head -1 nobody
# cp /home/lpar2rrd/.ssh/id_rsa /home/lpar2rrd/.ssh/realt_rsa # chown nobody /home/lpar2rrd/.ssh/realt_rsa # chmod 600 /home/lpar2rrd/.ssh/realt_rsa
$ df -g /home # AIX $ df -h /home # linux
$ crontab -e 0,10,20,30,40,50 * * * * /home/lpar2rrd/lpar2rrd/load_alert.sh > /home/lpar2rrd/lpar2rrd/load_alert.out 2>&1
$ crontab -e 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/lpar2rrd/lpar2rrd/load_hea.sh > /home/lpar2rrd/lpar2rrd/load_hea.out 2>&1
# useradd -s /usr/bin/ksh -c "LPAR2RRD agent user" -m lpar2rrd
# rpm -Uvh lpar2rrd-agent-6.00-0.ppc.rpm # rpm -qa|grep lpar2rrd-agent lpar2rrd-agent-6.00-0AIX 7.1+ note: you might need to specify option "--ignoreos" if you get an error:
# rpm -Uvh --ignoreos lpar2rrd-agent-6.00-0.ppc.rpm
# apt-get install lpar2rrd-agent_6.00-0_all.deb lpar2rrd-agent-6.00-0
# gunzip lpar2rrd-agent-5.00-0.solaris-i86pc.tar.gz # tar xf lpar2rrd-agent-5.00-0.solaris-i86pc.tar # pkgadd -d . The following packages are available: 1 lpar2rrd-agent LPAR2RRD OS agent 5.00 (i86pc) 5.00 ...Oracle Solaris upgrade under root:
# pkgrm lpar2rrd-agent # pkgadd -d .
# su - lpar2rrd $ crontab -e * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <LPAR2RRD-SERVER.your-domain.com> > /var/tmp/lpar2rrd-agent.out 2>&1Replace <LPAR2RRD-SERVER> by hostname of your LPAR2RRD server.
# echo "lpar2rrd" >> /etc/cron.allow
$ vi /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg LPAR2RRD_AGENT_DAEMON=1
$ ./load.sh Starting LPAR2RRD daemon on port:8162 ...
$ ps -ef|grep lpar2rrd-daemon lpar2rrd 10617010 1 0 Mar 16 - 0:00 /usr/bin/perl -w /home/lpar2rrd/lpar2rrd/bin/lpar2rrd-daemon.pl $ netstat -an| grep 8162 tcp4 0 0 *.8162 *.* LISTEN
$ telnet <LPAR2RRD-SERVER> 8162 Connected to 192.168.1.1 . Escape character is '^]'.This is ok, exit either Ctrl-C or ^].
$ /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl -d <LPAR2RRD-SERVER> ... Agent send : yes : forced by -d Agent send slp: sending wait: 4 OS/HMC agent working for server: <LPAR2RRD-SERVER> store file for sending is /var/tmp/lpar2rrd-agent-<LPAR2RRD-SERVER>-lpar2rrd.txtIt means that data has been sent to the server, all is fine
$ /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl -d <LPAR2RRD-SERVER> ... Agent send : yes : forced by -d Agent send slp: sending wait: 1 OS/HMC agent working for server: <LPAR2RRD-SERVER> store file for sending is /var/tmp/lpar2rrd-agent-<LPAR2RRD-SERVER>-lpar2rrd.txt Agent timed out after : 50 seconds /opt/lpar2rrd-agent/lpar2rrd-agent.pl:265It means that the agent could not contact the server.
$ ps -ef|grep lpar2rrd-daemon lpar2rrd 10617010 1 0 Mar 16 - 0:00 /usr/bin/perl -w /home/lpar2rrd/lpar2rrd/bin/lpar2rrd-daemon.pl $ cd /home/lpar2rrd/lpar2rrd $ tail logs/error.log-daemon $ tail logs/daemon.out new server has been found and registered: Linux (lpar=linuxhost01) mkdir : /lpar2rrd/data/Linux/no_hmc/linuxhost01/It means that new OS agent has been registered from linuxhost01 (Linux stand-alone example)
$ cd /home/lpar2rrd/lpar2rrd $ ls -l data/<server name>/*/<lpar name>/*mmm -rw-r--r-- 2 lpar2rrd staff 7193736 Mar 17 16:16 data/<server name>/<hmc name>/<lpar name>/cpu.mmm -rw-r--r-- 2 lpar2rrd staff 7193736 Mar 17 16:16 data/<server name>/<hmc name>/<lpar name>/lan-en1.mmm -rw-r--r-- 2 lpar2rrd staff 10790264 Mar 17 16:16 data/<server name>/<hmc name>/<lpar name>/mem.mmm -rw-r--r-- 2 lpar2rrd staff 7193736 Mar 17 16:16 data/<server name>/<hmc name>/<lpar name>/pgs.mmm -rw-r--r-- 2 lpar2rrd staff 7193736 Mar 17 16:16 data/<server name>/<hmc name>/<lpar name>/san-vscsi0.mmm -rw-r--r-- 2 lpar2rrd staff 3597208 Mar 17 16:16 data/<server name>/<hmc name>/<lpar name>/san_resp-vscsi0.mmm $ find data -name mem.mmm -exec ls -l {} \; ...
CRTSAVF FILE(QGPL/LPAR2RRD)
GRTOBJAUT OBJ(QSYS/QPMLPFRD) OBJTYPE(*PGM) USER(LPAR2RRD) AUT(*use) GRTOBJAUT OBJ(QSYS/QPMWKCOL) OBJTYPE(*PGM) USER(LPAR2RRD) AUT(*use)
ftp <ph.server.com> Connected to as400. 220-QTCP at 192.168.177.50. 220 Connection will close if idle more than 5 minutes. Name (as400.server.com:lpar2rrd): lpar2rrd 431 Requested security mechanism not available at this time. 331 Enter password. Password: 230 LPAR2RRD logged on. Remote system type is . ftp> bin ftp> cd qgpl ftp> put LPAR2RRD.savf LPAR2RRD local: LPAR2RRD.savf remote: LPAR2RRD 200 PORT subcommand request successful. 150 Sending file to member LPAR2RRD in file LPAR2RRD in library QGPL. 226 File transfer completed successfully. 3590400 bytes sent in 0.41 secs (9007.2 kB/s) ftp> by
DSPSAVF FILE(QGPL/LPAR2RRD) OUTPUT(*) LPAR2RRD *LIB PROD LPAR2RRD 152 YES ACCEPTFREE *PGM CLE LPAR2RRD 176 YES ...
RSTLIB SAVLIB(LPAR2RRD) DEV(*SAVF) SAVF(QGPL/LPAR2RRD) MBROPT(*ALL) ALWOBJDIF(*ALL) 35 object restored from LPAR2RRD to LPAR2RRD.
CHGJOBD JOBD(LPAR2RRD/LPAR2RRD) JOBQ(LPAR2RRD/LPAR2RRD) TEXT('RTV_SYSSTS') USER(LPAR2RRD) RQSDTA(*NONE) INLLIBL(LPAR2RRD QGPL QTEMP)After this command see LPAR2RRD *JOBD object in restored LPAR2RRD library.
CHGUSRPRF USRPRF(LPAR2RRD) JOBD(LPAR2RRD/LPAR2RRD)
MKDIR DIR('/home/LPAR2RRD')
GRTOBJAUT OBJ(QSYS/QPMLPMGT) OBJTYPE(*SRVPGM) USER(LPAR2RRD) AUT(*use)
PING RMTSYS('LPAR2RRD-SERVER.SERVER.COM') Verifying connection to host system LPAR2RRD-SERVER.SERVER.COM at address 192.168.1.2. Connection verification statistics: 5 of 5 successful (100 %).
TELNET RMTSYS('LPAR2RRD-SERVER.SERVER.COM') PORT(8162) RMTUSER(TESTSTRING) INZWAIT(15) Connecting to remote host 192.168.1.2 using port 8162
CHGCMDDFT CMD(LPAR2RRD/RTV_SYSSTS) NEWDFT('IPADR(LPAR2RRD-SERVER.SERVER.COM)')
CHGCMDDFT CMD(LPAR2RRD/RTV_SYSSTS) NEWDFT('IPADR(''192.168.1.2'')')
CHGUSRPRF USRPRF(LPAR2RRD) PASSWORD(*NONE)
ADDLIBLE LPAR2RRD GO MENU Select: 14 Accept Software Licensing Agreement ➞ page down ➞ F14 Accept OK:CL_ACCEPT Expiration date of this client is 2017-06-25
ER: RTV_SYSSTS: frp.HASH512not not correct. ER: RTV_SYSSTS: Please revalidate i5/OS client from MENU option F14. ER: RTV_SYSSTS: i5/OS client ended.Agent is licensed to free use for 1 year. You will have to re-accept license in the same way next year.
CHGJOBD JOBD(LPAR2RRD/LPAR2RRD) TEXT('RTV_SYSSTS') RQSDTA(*NONE) RMVAJE SBSD(LPAT2RRD/LPAR2RRD) JOB(LPAR2RRD) ADDLIBLE LPAR2RRD GO MENU Option 1. Set up parameters to start client as RTV_SYSSTS (opt.10) Accept all default parameters for command CHGJOBD and RMVAJE. Option 10. RTV_SYSSTS
CHGJOBD JOBD(LPAR2RRD) TEXT('STRSBS SBSD(LPAR2RRD/LPAR2RRD)') RQSDTA('RTV_SYSSTS') ADDAJE SBSD(LPAR2RRD/LPAR2RRD) JOB(LPAR2RRD) JOBD(LPAR2RRD/LPAR2RRD) ADDLIBLE LPAR2RRD GO MENU Option 2. Set up parameters to start client as STRSBS LPAR2RRD (option 11) Accept all default parameters for command CHGJOBD and ADDAJE. Option 11. STRSBS LPAR2RRD
GO MENU Select: Option 50
IF: C_SNDSTS - connection Established()
ADDLIBLE LPAR2RRD GO MENU Select: 13. END_SYSSTS ➞ Enter ➞ Enter
WRKJOB ➞ option 10 ➞ Display job log, if active, on job queue, or pending F10, F18 ... IN: END_SYSSTS No active jobs in subsystem LPAR2RRD Ending of subsystem LPAR2RRD in progress. IN: END_SYSSTS EndSbs LPAR2RRD *Immed EN: END_SYSSTS - *ALL. GO MENU Select: option 50 ➞ WRKSBSJOB LPAR2RRD
CRTUSRPRF USRPRF(LPAR2RRD) ..... JOBD(LPAR2RRD/LPAR2RRD) ...... CHGJOBD JOBD(LPAR2RRD/LPAR2RRD) .... INLLIBL(LPAR2RRD QTEMP) ....
GRTOBJAUT OBJ(QSYS/QPMLPMGT) OBJTYPE(*SRVPGM) USER(LPAR2RRD) AUT(*USE)Be careful if you upgrade your i5/OS. Service program QPMLPMGT is into QSYS library.
ADDLIBLE LPAR2RRD LPAR2RRD/END_SYSSTS
530 Not able to set ASP group for user LPAR2RRD; logon rejected.
CHGUSRPRF USRPRF(LPAR2RRD) JOBD(QGPL/QDFTJOBD)
Cannot use lib LPAR2RRD in library QSYS
$ perl /home/lpar2rrd/lpar2rrd/bin/conntest.pl 192.168.1.1 12443 Connection to "192.168.1.1" on port "12443" is ok
# su - lpar2rrd $ crontab -l | egrep "load_hmc_rest_api.sh" $
$ crontab -e # IBM Power Systems - REST API 0,20,40 * * * * /home/lpar2rrd/lpar2rrd/load_hmc_rest_api.sh > /home/lpar2rrd/lpar2rrd/load_hmc_rest_api.out 2>&1
Type |
Source |
Sample rate |
Data download |
---|---|---|---|
CMC | CMC REST API | 1 minute | 20 mins |
HMC | |||
HMC REST API | 1 minute | 20 mins | |
HMC CLI | 1 hour | ||
OS agent | |||
AIX | 1 minute | ~20 mins | |
VIOS | |||
Linux on POWER | |||
Linux x86 | |||
IBM i (AS/400) | |||
NMON | |||
AIX | 1 minute | 10 mins or offline batch | |
VIOS | |||
Linux on POWER | |||
Linux x86 |
su - lpar2rrd tar xvf lpar2rrd-7.XX.tar cd lpar2rrd-7.XX ./install.sh
cd /home/lpar2rrd/lpar2rrd . etc/lpar2rrd.cfg; $PERL bin/perl_modules_check.plIf there is missing "LWP::Protocol::https" then check this docu to fix it
find /opt -name RRDp.pm 2>/dev/null /opt/freeware/lib/perl5/5.34/vendor_perl/RRDp.pm /opt/freeware/lib64/perl5/5.34/vendor_perl/RRDp.pm
PERL=/usr/bin/perl PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/vmware-lib:/home/lpar2rrd/lpar2rrd/lib:/opt/freeware/lib64/perl5/5.34/vendor_perl:/opt/freeware/lib/perl5/5.34/vendor_perl RRDTOOL=/opt/freeware/bin/rrdtoolAdjust above PERL5LIB path based on which Perl you have in /opt/freeware/bin/perl, above example is for "5.34", you see it in the paths:
/opt/freeware/bin/perl -v| head -2 This is perl 5, version 34, subversion 1 (v5.34.1) built for ppc-aix-thread-multi-64all
su - lpar2rrd umask 022 cd /home/lpar2rrd/lpar2rrd cp html/.htaccess www cp html/.htaccess lpar2rrd-cgi
crontab -l | grep load.sh
$ crontab -e # LPAR2RRD UI 0,30 * * * * /home/lpar2rrd/lpar2rrd/load.sh > /home/lpar2rrd/lpar2rrd/load.out 2>&1Assure there is just one such entry in crontab.
# echo "lpar2rrd" >> /etc/cron.allow
crontab -l | grep "load_hmc_rest_api.sh"
crontab -e # HMC REST API support 0,20,40 * * * * /home/lpar2rrd/lpar2rrd/load_hmc_rest_api.sh > /home/lpar2rrd/lpar2rrd/load_hmc_rest_api.out 2>&1
cd /home/lpar2rrd/lpar2rrd ./load.sh
Can't load '/usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: Could not load module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.soIn this case:
cd /home/lpar2rrd/lpar2rrd umask 022 echo "export LIBPATH=/opt/freeware/lib" >> etc/.magic
tail /var/log/httpd/error_log # Apache error log tail /var/log/httpd/access_log # Apache access log tail /var/tmp/lpar2rrd-realt-error.log # STOR2RRD CGI-BIN log tail /var/tmp/systemd-private*/tmp/lpar2rrd-realt-error.log # STOR2RRD CGI-BIN log when Linux has enabled private temp
umask 022 cd /home/lpar2rrd/lpar2rrd/ cp bin/test-healthcheck-cgi.sh lpar2rrd-cgi/go to the web browser: http://<your web server>/lpar2rrd/test.html