Problems while migrating LPAR2RRD from AIX to SuSE - here load.sh

Hey guys,

anybody noticed problems with SuSE and lpar2rrds load.sh? - My installation works fine - nmon data are loaded, os-agent delivers data and load.sh works fine if I start it straight from bash.

BUT - Data aren't generated from cron:
0 * * * * /opt/lpar2rrd/load.sh > /opt/lpar2rrd/logs/load.out 2>&1

error in error.log says:

Use of uninitialized value $item_data in string eq at /opt/lpar2rrd/bin/lpar2rrd.pl line 1962
and further:
Tue Mar 15 11:00:11 2016: hmc01.xx.xx.xx:P04_p770-MR1 : No valid cpu data got from HMC :" : "Mar 15, 2016 8:55:59 AM",0,0,0,0,0 /opt/lpar2rrd/bin/LoadDataModule.pm:656 :

I guess it has sth. to do with environment issues - but somehow now idea how to continue :-(

Anybody less braindead than me?

Comments

  • It seems to be about time format. We expect something like:
    03/15/2016 10:01:29
    but in your example I see this format (include double quote!):
    "Mar 15, 2016 8:55:59 AM"

    It is strange as each our HMC query starts with "export LANG=en_US; ...", this should assure that the format is always same.

    Here you can see downloaded data, compare cron vrs command line
    head data/server/hmc/in-m

  • Hey Pavel, you are incredible fast !!(thx))!!

    and absolutely right!

    here output from in-m via cmd-line:
    03/15/2016 11:03:59,SAP1NIM,0.1,1,uncap,16890905187464419,2013640834234422,4273905351360752,0,ded,12288,,,,,2303624669264704 (correct I guess)

    Tue Mar 15 11:40:15 2016: "Mar 15, 2016 10:39:59 AM",SAP1NIM,0.1,1,uncap,16890831460037907,2013631641013353,4273883354813323,0,ded,12288,,,,,2303613166804656 : (cron)

    I noticed that in load.sh - there was export LANG=C and changed it to en_US - but it didn't influence cron load.sh output :-( - strange no such problems in AIX ...
  • it is strange as local Linux env should not influence it, as I wrote we always use:
    ssh hmc "export LANG=en_US; lslparutil -r lpar ...."

    ok, run cmd "set" from cron and "set" from cmd line, check for differences.
    Post "set" from cron, it will not be long.
  • Hi Lemmy,
    pls check /etc/ssh/ssh_config - there used to be lines like these:
    Host *
    SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
    SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
    SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
    SendEnv XMODIFIERS
    Try to comment them out to prevent sending locales to your ssh hosts
  • Hey guys - you rule !!!

    I haven't set up this SuSE-box on my own - thats why I haven't noticed this ssh_config stuff we usually never use in AIX.

    Jirka - you are absolutely right - it was fixed after commenting "SendEnv" out.

    03/15/2016 13:44:00, <=== perfect !! :-)
    SAPL5Q,0.1,2,uncap,244114704688495,50590239603267,53252632628381, usf ..

    Wow - both of you made my day - I was really close to get crazy :-)

    Really thanks a lot !!!
Sign In or Register to comment.