AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
Expand all | Collapse all

lpar2rrd script fails with math library error

  • 1.  lpar2rrd script fails with math library error

    Posted Fri July 10, 2020 02:46 AM
    Edited by Peter Platanitis Fri July 10, 2020 02:47 AM
    I am running lpar2rrd on 2 of my nim servers (AIX 7100-05-05-1939) collecting data from 2 HMC's .The lpar2rrd script /home/lpar2rrd/lpar2rrd/load.sh  now fails with the following errors :-

    lpar2rrd@sdvx10090 /home/lpar2rrd/lpar2rrd/logs # /home/lpar2rrd/lpar2rrd/load.sh

    /home/lpar2rrd/lpar2rrd/load.sh[403]: -v: not found
    /home/lpar2rrd/lpar2rrd/load.sh[403]: {print $2}: not found
    Consider RRDtool upgrade to version 1.3.5+ (actual one is )
    This will allow graph zooming: http://www.lpar2rrd.com/zoom.html

    VMware : not identified, no credentials
    jobs -l :
    installing WWW : install-html.sh vmware
    Host identif : AIX
    timestamp : Fri Jul 10 16:27:09 EET 2020
    Menu : no menu refresh for vmware
    heatmap : start Fri Jul 10 16:27:09 2020
    HMC web cfg : HMC is configured through GUI, (HMC_LIST in lpar2rrd.cfg is ignored). Actual HMC_LIST is made from etc/web_config/hosts.json => sphx12597 sdhx12607
    Starting load for old sphx12597 through SSH (not Rest API)
    Starting load for old sdhx12607 through SSH (not Rest API)
    jobs -l :
    [3] + 19923084 Running <command unknown>
    [2] - 16580814 Running <command unknown>
    [1] 17825992 Running <command unknown>
    heatmap : (VMware) set cpu utilization for 0 vm
    heatmap : (VMware) set memory utilization for 0 vm
    heatmap : (VMware) set cpu utilization for 0 pools
    heatmap : (VMware) set memory utilization for 0 pools
    heatmap : end Fri Jul 10 16:27:09 2020
    Waiting for HMC: 19923084
    date end all VM: Fri Jul 10 16:27:09 EET 2020
    Waiting for HMC: 16580814
    Waiting for HMC: 17825992
    rmc check : not this time 10 == 10
    RMC from load.sh
    LPAR2RRD custom free version 6.15
    No custom groups configured
    lpars_count : not this time 10 == 10
    trim logs : not this time 10 == 10
    installing WWW : install-html.sh power
    Host identif : AIX
    timestamp : Fri Jul 10 16:27:09 EET 2020
    Menu : no menu refresh for power
    menu : menu_xenserver.json is missing, force it to create a new one
    installing WWW : install-html.sh xenserver
    Host identif : AIX
    timestamp : Fri Jul 10 16:27:10 EET 2020
    Menu : menu refresh for xenserver
    menu : menu_ovirt.json is missing, force it to create a new one
    menu : menu_ovirt.json is missing, force it to create a new one
    installing WWW : install-html.sh ovirt
    Host identif : AIX
    timestamp : Fri Jul 10 16:27:10 EET 2020
    Menu : menu refresh for ovirt
    installing WWW : install-html.sh oracledb
    Host identif : AIX
    timestamp : Fri Jul 10 16:27:10 EET 2020
    Menu : no menu refresh for oracledb
    heatmap : start Fri Jul 10 16:27:10 2020
    heatmap : (Power) set cpu utilization for 0 lpars
    heatmap : (Power) set cpu utilization for 0 pools
    heatmap : (Power) set memory utilization for 0 lpars
    heatmap : end Fri Jul 10 16:27:10 2020
    reporter START : Fri Jul 10 16:27:10 2020
    load cfg : /home/lpar2rrd/lpar2rrd/etc/web_config/reporter.json
    product : LPAR2RRD
    reporter : not this time 10 == 10
    reporter END : Fri Jul 10 16:27:10 2020
    An error occured in lpar2rrd, check /home/lpar2rrd/lpar2rrd/logs/error.log and output of load.sh

    $ tail -10 /home/lpar2rrd/lpar2rrd/logs/error.log

    Couldn't load any math lib(s), not even fallback to Calc.pm at /home/lpar2rrd/lpar2rrd/bin/LoadDataModule.pm line 8.
    BEGIN failed--compilation aborted at /home/lpar2rrd/lpar2rrd/bin/LoadDataModule.pm line 8.
    Compilation failed in require at /home/lpar2rrd/lpar2rrd/bin/lpar2rrd.pl line 18.
    BEGIN failed--compilation aborted at /home/lpar2rrd/lpar2rrd/bin/lpar2rrd.pl line 18.
    Couldn't load any math lib(s), not even fallback to Calc.pm at /home/lpar2rrd/lpar2rrd/bin/LoadDataModule.pm line 8.
    BEGIN failed--compilation aborted at /home/lpar2rrd/lpar2rrd/bin/LoadDataModule.pm line 8.
    Compilation failed in require at /home/lpar2rrd/lpar2rrd/bin/lpar2rrd.pl line 18.
    BEGIN failed--compilation aborted at /home/lpar2rrd/lpar2rrd/bin/lpar2rrd.pl line 18.
    Couldn't load any math lib(s), not even fallback to Calc.pm at /home/lpar2rrd/lpar2rrd/bin/daily_lpar_check.pl line 4.
    BEGIN failed--compilation aborted at /home/lpar2rrd/lpar2rrd/bin/daily_lpar_check.pl line 4.
    date end all : Fri Jul 10 16:27:10 EET 2020


    ------------------------------
    Peter Platanitis
    ------------------------------


  • 2.  RE: lpar2rrd script fails with math library error

    Posted Tue July 14, 2020 02:44 PM
    Hi,
    lpar2rrd is not part of AIX nor from IBM nor is it in the AIX Open Source Toolbox.
    So I am not sure why you are asking the question here.

    I suggest you take your question to the vendors XoruX at lpar2rrd.com
    You can purchase support there.
    Cheers, Nigel Griffiths.

    ------------------------------
    Nigel Griffiths
    ------------------------------



  • 3.  RE: lpar2rrd script fails with math library error

    Posted Wed July 15, 2020 01:28 PM
    It could be a libpath problem.  I have found that some software requires the AIX libraries first and then the freeware/lib, and other software requires the reverse. Depends upon which libraries are included with toolbox rpms.

    ------------------------------
    Bruce Landrum
    ------------------------------



  • 4.  RE: lpar2rrd script fails with math library error

    Posted Thu July 16, 2020 07:36 AM
    Hi Peter,

    Those first two lines after load.sh look unusual to me, e.g. load.sh shouldn't complain about missing "commands".
    Looking at my copy of load.sh around line 403, there is a part that tries to find out the rrd version, and that version information is missing from 3rd line.
    IMHO re-download the lpar2rrd version you have installed, verify the checksum of the downloaded file, extract it and extract lpar2rrd stuff using: "gzip -dc lpar2rrd.tar.Z|tar xvf -" and compare the stock and your version of load.sh "diff -u dist/load.sh /home/lpar2rrd/lpar2rrd/load.sh".
    If there are differences, you might want to do an update, regardless of the version you are running.
    FYI at least in the past lpar2rrd has required perl version 5.8.x. This might have changed, or not, I don't know because I haven't checked/verified if the newer perl versions that are shipped with AIX, 5.28 etc, are compatible with lpar2rrd.

    ------------------------------
    Esa Kärkkäinen
    ------------------------------



  • 5.  RE: lpar2rrd script fails with math library error

    Posted Mon July 20, 2020 10:49 PM
    Hi All,

    I logged this as a case with IBM support and they recommended the following ifxes for below apars be applied. and this has now resolved my issue.

    APAR IJ21688
    ========================== EFIX DESCRIPTION =============================
    Lib.pm module is missing in perl-5.28.1.0. Becuase of this missing file
    Math::BigFloat module isn't being loaded.
    $ perl -e 'use Math::BigFloat;'
    Couldn't load any math lib(s), not even fallback to Calc.pm

    APAR IJ24871
    ========================== EFIX DESCRIPTION =============================
    File Parserdetails.ini is not shipped with perl.rte 5.28.1.0

    Users may experience the following:
    warning message: could not find ParserDetails.ini in
    /usr/opt/perl5/lib/site_perl/5.28.1/XML/SAX

    ------------------------------
    Peter Platanitis
    ------------------------------



  • 6.  RE: lpar2rrd script fails with math library error

    Posted Tue July 21, 2020 01:06 AM
    I'd be curious what you were doing right before it started failing?  Did you update any rpms from perzl to IBM?  If so that's probably what broke it.  From my experience with lpar2rrd it doesn't like the IBM compiled rpms.  my hope is lpar2rrd stops referencing perzl rpms on their install page and makes it works exclusively with IBM rpms..

    ------------------------------
    James Franznick
    ------------------------------



  • 7.  RE: lpar2rrd script fails with math library error

    Posted Tue July 21, 2020 02:16 AM
    Hi 

    Incidentally the lpar2rrd script starting failing after I had updated to service pack AIX 7100-05-05-1939 on both my NIM servers. It appears this service pack contained the following APAR which updated the perl package version and introduced the issue.

    IJ16717 Update the perl package to version 5.28.1

    ------------------------------
    Peter Platanitis
    ------------------------------



  • 8.  RE: lpar2rrd script fails with math library error

    Posted Tue July 21, 2020 10:40 AM
    Yes that would do it. You're going to have to tell lpar2rrd to start using it in the lpar2rrd.cfg file. I would recommend using perzl perl rpm v5.8.8 but you may be able to get the IBM version working

    lpar2rrd.cfg:

    PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/vmware-lib:/opt/freeware/lib/perl5/vendor_perl/5.8.8/ppc-thread-multi:/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi:/opt/freeware/lib/perl5/5.8.8:/usr/opt/perl5/lib/site_perl/5.8.8:/opt/freeware/lib/perl/5.8.8:/home/lpar2rrd/lpar2rrd/lib:/opt/freeware/lib/perl/5.24.1


    ------------------------------
    James Franznick
    ------------------------------



  • 9.  RE: lpar2rrd script fails with math library error

    Posted Tue July 21, 2020 10:52 AM
    Perl version 5.10 is available on AIX toolbox. This is not same as AIX perl and it is with AIX toolbox terms and conditions. 
    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/perl/perl-5.10.1-1.aix6.1.ppc.rpm

    But we always recommend to use latest version as there may be security vulnerabilities and bugs.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 10.  RE: lpar2rrd script fails with math library error

    Posted Tue July 21, 2020 11:35 AM
    I haven't had a lot of luck with IBM rpms and lpar2rrd. The way lpar2rrd is built it is looking for perzl compiles, this is especially true with perl since it requires perl mods that are only available from perzl. otherwise you're going down a rabbit hole of cpan..

    https://www.lpar2rrd.com/aix_install.php

    perl-5.8.8-2.aix5.1.ppc.rpm
    perl-TimeDate-1.20-1.aix5.1.noarch.rpm
    perl-XML-Simple-2.18-1.aix5.1.noarch.rpm
    perl-XML-Parser-2.41-1.aix5.1.ppc.rpm
    perl-URI-1.58-1.aix5.1.noarch.rpm
    perl-XML-SAX-0.99-1.aix5.1.noarch.rpm
    perl-XML-LibXML-2.0012-1.aix5.1.ppc.rpm
    perl-XML-SAX-Base-1.08-1.aix5.1.noarch.rpm
    perl-XML-NamespaceSupport-1.11-1.aix5.1.noarch.rpm
    perl-Crypt-SSLeay-0.57-2.aix6.1.ppc.rpm
    perl-Net_SSLeay.pm-1.55-3.aix6.1.ppc.rpm


    ------------------------------
    James Franznick
    ------------------------------



  • 11.  RE: lpar2rrd script fails with math library error

    Posted Fri July 24, 2020 06:32 AM
    Edited by C- -T Fri July 24, 2020 06:37 AM
    lpar2rrd works easily with the latest aixtoolbox perl, just install the dependencies as usual and set the PERL5LIB in lpar2rrd.cfg.

    heres my perl mod install script if this helps (use cpnaminus, you will thank me later):

    #!/usr/bin/ksh
    
    rm -rf /home/nmon/lpar2rrd/aix_lpar2rrd_perlmods/*
    
    /opt/freeware/bin/cpanm  --notest --reinstall -l /home/nmon/lpar2rrd/aix_lpar2rrd_perlmods TimeDate XML::Simple XML::Parser URI XML::SAX XML::LibXML XML::SAX::Base XML::NamespaceSupport Crypt::SSLeay Net::SSLeay PDF::API2 Compress::Raw::Zlib
    
    cp -Rp /opt/freeware/lib/perl5/site_perl/5.28.1/ppc-aix-thread-multi/RRDp.pm /home/nmon/lpar2rrd/aix_lpar2rrd_perlmods/lib/perl5/ppc-aix-thread-multi/
    cp -Rp /opt/freeware/lib/perl5/site_perl/5.28.1/ppc-aix-thread-multi/auto/RRDs /home/nmon/lpar2rrd/aix_lpar2rrd_perlmods/lib/perl5/ppc-aix-thread-multi/auto/​


    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 12.  RE: lpar2rrd script fails with math library error

    Posted Tue October 13, 2020 05:46 AM

    Hello C- -T,

    May I ask you how you solve the dependencies problems with the Perl modules? We are missing LWP::Protocol::https and to install this module with

    perl -MCPAN -eshell

    we need another Module "HTML-Parser".

    Thanks in advance for your help...

    best regards,

    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 13.  RE: lpar2rrd script fails with math library error

    Posted Tue October 13, 2020 07:35 AM
    Edited by Esa Kärkkäinen Tue October 13, 2020 07:37 AM
    Hi,

    I wrote a script that uses "/opt/freeware/bin/cpanm" aka App::cpanminus to install all dependencies that lpar2rrd requires.

    Please note that the script removes two files, or symbolic links. My environment has a long and sordid past, so I had some remnants of old openssl libraries installed by old  openssl RPM packages

    I've remove the script from this post because line brakes were messed up. I'll try to upload the script.

    Please note that you must also modify PERL5LIB in your lpar2rrd/etc/lpar2rrd.conf file. Below is the one that works for me, which contains extra directories and directories should arranged in more optimized order.

    PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/vmware-lib::/home/lpar2rrd/lpar2rrd/aix_lpar2rrd_perlmods/lib/perl5:/home/lpar2rrd/lpar2rrd/aix_lpar2rrd_perlmods/lib/perl5/ppc-aix-thread-multi:/home/lpar2rrd/lpar2rrd/aix_lpar2rrd_perlmods:/opt/freeware/lib/perl5/vendor_perl/5.8.8/ppc-thread-multi:/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi:/opt/freeware/lib/perl5/site_perl/5.22.0/ppc-aix-thread-multi:/opt/freeware/lib/perl5:/usr/opt/perl5/lib/site_perl:/opt/freeware/lib/perl5/site_perl/5.22.0:/home/lpar2rrd/lpar2rrd/lib


    Best regards,

    Esa



    ------------------------------
    Esa Kärkkäinen
    ------------------------------



  • 14.  RE: lpar2rrd script fails with math library error

    Posted Tue October 13, 2020 07:42 AM
      |   view attached
    Here is the script that I wrote.

    Br,

    Esa

    ------------------------------
    Esa Kärkkäinen
    ------------------------------

    Attachment(s)

    sh
    lpar2rrd.perl.deps.sh   1 KB 1 version


  • 15.  RE: lpar2rrd script fails with math library error

    Posted Tue October 13, 2020 08:47 AM
    Thanks a lot Esa...

    It seems there is something different on our system... we don't have "/opt/freeware/bin/cpanm" there is only "cpan"

    /tmp/lpar2rrd_deps.sh[35]: /opt/freeware/bin/cpanm: not found

    regards,
    Joerg

    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 16.  RE: lpar2rrd script fails with math library error

    Posted Tue October 13, 2020 09:07 AM
    Hi,

    You have to install the CPAN minus module/app before my script works.
    The CPAN minus is required due to the web of dependencies between the perl modules.
    The module can be found here https://metacpan.org/pod/App::cpanminus and there are installlation instructions aswell on that page.

    Br,

    Esa

    ------------------------------
    Esa Kärkkäinen
    ------------------------------



  • 17.  RE: lpar2rrd script fails with math library error

    Posted Wed October 14, 2020 03:47 AM
    Good Morning Esa,

    thanks again for your help. I installed cpanminus, but then getting errors from "tar". CPANM is using wrong options for "tar" and can not unpack the downloaded package.
    In the meantime I got it managed to install the missing perl mods with cpan. It didn't work before, because there was a link set in /usr/bin to a non-compatible CPAN version. After setting the link to the correct AIX-Toolbox version it worked.

    Thanks a lot for your support.

    best regards,
    Joerg

    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 18.  RE: lpar2rrd script fails with math library error

    Posted Wed October 14, 2020 04:05 AM
    Edited by Esa Kärkkäinen Wed October 14, 2020 04:06 AM
    Hi,

    The cpanminus app/module uses "modern" tar options when unpacking stuff, e.g. it does not work with "/usr/bin/tar",  but it works with "/opt/freeware/bin/tar", which is the reason I added "/opt/freeware/bin" to the beginning of the PATH environment variable in my script, before running "cpanm".

    $ which tar
    /usr/bin/tar
    $ PATH=/opt/freeware/bin:$PATH
    $ which tar
    /opt/freeware/bin/tar
    $ ​


    Best regards,

    Esa



    ------------------------------
    Esa Kärkkäinen
    ------------------------------



  • 19.  RE: lpar2rrd script fails with math library error

    Posted Tue October 27, 2020 02:29 AM
    Hello, I've found this guide, and I've issues to install the perl modules, I used the script provided here, but seem some modules are failing to install, I also don't see the reason it it's failing.... Is there someone with same issue?

    uilding Encode-3.07 ... FAIL
    ! Installing Encode failed. See /home/root/.cpanm/work/1603742036.13828602/build.log for details. Retry with --force to force install it.
    ! Installing the dependencies failed: Installed version (2.97) of Encode is not in range '3.01'
    ! Bailing out the installation for HTTP-Message-6.26.
    ! Installing the dependencies failed: Module 'HTTP::Headers::Util' is not installed, Module 'HTTP::Request' is not installed
    ! Bailing out the installation for HTTP-Cookies-6.08.

    ! Installing the dependencies failed: Module 'HTML::Entities' is not installed, Module 'HTTP::Negotiate' is not installed, Module 'HTML::HeadParser' is not installed, Module 'HTTP::Cookies' is not installed, Module 'HTTP::Response' is not installed, Module 'HTTP::Daemon' is not installed, Module 'HTTP::Request::Common' is not installed, Module 'HTTP::Status' is not installed, Module 'HTTP::Request' is not installed
    ! Bailing out the installation for libwww-perl-6.49.
    ! Installing the dependencies failed: Module 'LWP::Protocol::http' is not installed, Module 'LWP::UserAgent' is not installed, Module 'IO::Socket::SSL' is not installed
    ! Bailing out the installation for LWP-Protocol-https-6.09.


    ------------------------------
    Robson Francisco Maniasso
    ------------------------------