AIX Open Source

 View Only
Expand all | Collapse all

Nimon for AIX 7.3

  • 1.  Nimon for AIX 7.3

    Posted Mon October 07, 2024 05:50 AM

    hello, 

    we encountered the error below when installing nimon on 7300-01-02-2319.

    root:/tmp/njmon_aix_binaries_v81> ./ninstall
    Save old versions by adding .save to the filename
    Operating Systems AIX7300-01 installing into /usr/lbin version=v81
    Setting file permissions
    -rwxrwxr-x    2 root     system       958756 07 oct 10:50 /usr/lbin/njmon
    No updated manual pages at beta 1

    Best regards,



    ------------------------------
    Amira Romdhane
    ------------------------------


  • 2.  RE: Nimon for AIX 7.3

    Posted Tue October 08, 2024 04:44 AM

    Hi,

    That looks like it's installed ok to me (it's been a while though).  njmon isn't part of the IBM provided opensource packages that are generally discussed in this forum.  There are contact details for the author on https://nmon.sourceforge.io/pmwiki.php?n=Site.Njmon.  Nigel does participate in this forum and may reply to this thread :)

    Phill.



    ------------------------------
    Phill Rowbottom
    ------------------------------



  • 3.  RE: Nimon for AIX 7.3

    Posted Thu October 17, 2024 04:33 AM
    Edited by nigel griffiths Thu October 17, 2024 04:34 AM

    Hi,

    I do not see an error.

    There is a note that a new manual page is not available as this version as it was a beta release. That is not an error.

    Run nimon -!

    To check the nimon version you have installed and can be found in your $PATH list.

    nimon will immediately stop after outputting the version details

    Note you are installing an old njmon/nimon version. Version 83 is available from:

    https://nmon.sourceforge.io/pmwiki.php?n=Site.Njmon

    This was released as a beta version but turned out we found no further bugs so it is a full release now.

    See the note on the webpage "Upgraded this release = no longer considered a beta."

    Perhaps, I should have released  the same file again without the words "beta" on it. I will do that next time.

    Always use the latest version.

    I hope this helps, cheers, Nigel

    ps: Any one can contact me at nigelargriffiths@hotmail.com

    For help or comments.


    ------------------------------
    Nigel Griffiths - IBM retired
    London, UK
    @mr_nmon
    ------------------------------



  • 4.  RE: Nimon for AIX 7.3

    Posted 7 days ago

    Hello, 

    I want to install nimon on AIX 7.3.
    I downloaded version njmon_aix_v83beta.zip
    how I can compile the binary?

    Best regards,



    ------------------------------
    Amira Romdhane
    ------------------------------



  • 5.  RE: Nimon for AIX 7.3

    Posted 7 days ago

    That download contains the binary, you don't need to compile anything.



    ------------------------------
    Phill Rowbottom
    ------------------------------



  • 6.  RE: Nimon for AIX 7.3

    Posted 7 days ago

    hello, 

    I extracted the zip file.

     so next step how i can install nimon.

    should I compile njmon.c?

    Makefile
    njmon_aix_v83.c
    njmon_aix71_v83
    njmon_aix72_v83
    njmon_aix73_v83
    njmon_vios3_v83

    Best Regards,



    ------------------------------
    Amira Romdhane
    ------------------------------



  • 7.  RE: Nimon for AIX 7.3

    Posted 7 days ago

    You do not need to compile anything.  The following are binary files, each for a different AIX/VIOS release:

    njmon_aix71_v83
    njmon_aix72_v83
    njmon_aix73_v83
    njmon_vios3_v83

    You can simply place the appropriate binary into an appropriate location and make it executable.

    If you are having difficulties, it may be easier for you to use the older njmon_aix_binaries_v81.zip which includes a script to perform the install.  This isn't in the v83 file.



    ------------------------------
    Phill Rowbottom
    ------------------------------



  • 8.  RE: Nimon for AIX 7.3

    Posted 7 days ago

    Hello Amira,

    so step by step:
    1. check where the actual nimon version is installed: which nimon

    2. remane the file  "njmon_aix73_v83" to nimon: mv njmon_aix73_v83 nimon

    3. copy the new nimon file to the location you got from point 1.

    Done.

    kind regards,
    Joerg



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



  • 9.  RE: Nimon for AIX 7.3

    Posted 7 days ago

    Hello Joerg,

    1) which nimon
    which: 0652-141 There is no nimon in /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java8_64/jre/bin /usr/java8_64/bin.

    The only thing I did was to extract the zip file under a folder /tmp/njmon.

     So the next action is to launch the installation normally?

    /tmp/njmon> ls -lrt
    total 9456
    -rw-r--r--    1 root     system         1296 Sep 28 2023  Makefile
    -rw-r--r--    1 root     system       241779 Dec 14 2023  njmon_aix_v83.c
    -rw-r--r--    1 root     system       681799 Dec 14 2023  njmon_aix73_v83
    -rw-r--r--    1 root     system       978431 Dec 16 2023  njmon_aix71_v83
    -rw-r--r--    1 root     system       889835 Dec 16 2023  njmon_aix72_v83
    -rw-r--r--    1 root     system       919610 Dec 16 2023  njmon_vios3_v83
    -rw-r--r--    1 root     system      1102483 Nov 27 02:28 njmon_aix_v83beta.zip

    Best regards, 



    ------------------------------
    Amira Romdhane
    ------------------------------



  • 10.  RE: Nimon for AIX 7.3

    Posted 6 days ago

    Hello Phill Rowbottom

    I installed nimon via script 
    I encountered the error below when launching data collection via nimon
    /usr/lbin/nimon -s 30 -k  -i serveur_influxdb -p 8086 -x njmon -y admin -z admin
    27328840
    ERROR: njmon version njmon4AIX7-v81-26/07/2022
    ERROR: Assert Failure in file="njmon_aix_v81.c" in function="ps_disk_path_init" at line=4867
    ERROR: Reason=malloc(pathprev)
    ERROR: Pointer=0x0
    ERROR: Expression=[[expression]]
    ERROR: errno=35
    ERROR: errno means : No message of desired type
    ERROR: Exiting njmon

    Best regards,



    ------------------------------
    Amira Romdhane
    ------------------------------



  • 11.  RE: Nimon for AIX 7.3

    Posted 6 days ago

    Can you let us know which release of AIX you are running?
    Using oslevel -s

    So I can check how far out of date your AIX release is and on how to upgrade.

    In the above, you are running /usr/lbin/nimon but that is the v81 from 2022 = 2 years out of date.

    You appear to have NOT updated the /usr/lbin/nimon file to version 83

    The ninstall shell script is pretty simple to follow - I might have assumed systems admin people understand scripts.

    - near the top you would have to change VERSION=81 to VERSION=83

    I will release a new njmon very soon (hopefully today) to make installing simpler.

    Cheers, Nigel



    ------------------------------
    Nigel Griffiths - IBM retired
    London, UK
    @mr_nmon
    ------------------------------



  • 12.  RE: Nimon for AIX 7.3

    Posted 6 days ago

    Hello Nigel,

    the version of AIX installed is 7300-01-02-2319

    Best regards,



    ------------------------------
    Amira Romdhane
    ------------------------------



  • 13.  RE: Nimon for AIX 7.3

    Posted 4 days ago

    Good move a recent AIX version.

    Just in the last hour or so released a new version njmon for AIX, version 85.

    Get it from here https://nmon.sourceforge.io/pmwiki.php?n=Site.Njmon

    The "ninstall" should work.

    Unzip, then as root user run ./ninstall

    Let me know if you have problems

    Cheers, Nigel



    ------------------------------
    Nigel Griffiths - IBM retired
    London, UK
    @mr_nmon
    ------------------------------



  • 14.  RE: Nimon for AIX 7.3

    Posted 2 days ago

    Hi Nigel,

    Thanks for the new version. Will there be a version for vios version 4? Or can I use njmon_vios3 on vios4?

    TIA

    Ane-Pieter Wieringa



    ------------------------------
    Ane-Pieter Wieringa
    ------------------------------



  • 15.  RE: Nimon for AIX 7.3

    Posted 2 days ago
    Edited by nigel griffiths 2 days ago

    With the new njmon version 85 there is a single binary for AIX 7.2, AIX 7.3 and VIOS3.

    - Please, ignore the njmon for AIX72, AIX73 and VIOS3 binary files (njmon_aix72_v85, njmon_aix_73_v85 and njmon_vio2_v85) there are supplied in case we have unexpected problems i.e. emergency use only.  They might be useful if you are running AIX older release like you have not updated them for years, so many TL and SP missing: oslevel -s will tell you what you are running the the year it was released.

    In the past it was a special compile for VIOS 3 support due to additional functions in the libperfstat library for VIOS resource stats.

    - This njmon for VIOS version would fail to start when running on AIX due to the library mismatches.

    In preparing version 85, I found AIX and VIOS3 now have the same library (well done AIX and VIOS developers) and if you are running njmon_aix7_v85 on a AIX the function call for the VIOS stats just return "not available".

    This new combined AIX and VIOS binary for njmon_aix7_v85. If running on AIX, it now silently ignores users requesting VIOS resource stats (options -v -u and -U).

    - i.e. you request VIOS stats on AIX that is not a VIOS = pretty dumb IMHO but njmon silently works out there are no VIOS resources and just delivers the regular AIX stats.

    I don't have a AIX 7.1 to test on but I am confident the single binary njmon_aix7_v835  should run OK there too.

    If there is a problem with njmon_aix7_v835  on AIX 7.1 or VIOS 4.0, I would expect it to refuse to start up due to a library mismatch. So, it is very simple to detect.

    Just type: njmon_aix7_v85 -!

    - this will output the njmon version an stop - but that will prove it found the correct libraries on start up.
    If it does not run I will have to ask for access to AIX 7.1 to test and compile a version.

    VIOS 4 is just out - this is based on the newer AIX 7.3 release. I am very sure the same one binary njmon_aix7_v85 with run there with no problems.

    We all know the VIOS is a regular AIX operating system with some extra packages to provide the VIOS function, right?

    - OK there are some other things like the "padmin" user, security items and they might have removed some standard AIX function that the VIOS will never ever use.

    I am waiting for some people to run a test or two for AIX 7.1 and VIOS 4.

    By the way, AIX 6 and VIOS 2 are history now (no binaries from me). The njmon code still has the compile time flag to support AIX6 that is -D AIX6 (also needed for VIOS2). Users will need to compile their own copies.

    I hope this explains some back ground and points out njmon life just got simpler.

    Cheers,



    ------------------------------
    Nigel Griffiths - IBM retired
    London, UK
    @mr_nmon
    ------------------------------



  • 16.  RE: Nimon for AIX 7.3

    Posted 2 days ago

    Hello, 

    I installed the version v85 and I had the same problem


    ./ninstall
    Save old versions by adding .save to the filename
    Operating Systems AIX7300 installing njmon version=v85 into /usr/lbin
    Installing njmon_aix7_V85 - combined AIX and VIOS
    Setting the file permissions
    Linking the njmon file to the nimon file (see ln command)
    -rwxrwxr-x    2 root     system      1023702 Dec 02 07:13 /usr/lbin/nimon
    -rwxrwxr-x    2 root     system      1023702 Dec 02 07:13 /usr/lbin/njmon
    Installing manual pages for njmon and nimon in /usr/share/man/man1
    #root/tmp/njmon> /usr/lbin/nimon -s 30 -k  -i INFLUXDB -p 8086 -x njmon -y test -z test
    34079188
     ERROR: njmon version AIX7-85-28/11/2024
    ERROR: Assert Failure in file="njmon_aix_v85.c" in function="ps_disk_path_init" at line=5251
    ERROR: Reason=malloc(pathprev)
    ERROR: Pointer=0x0
    ERROR: Expression=[[expression]]
    ERROR: errno=35
    ERROR: Exiting njmon

    best regards,



    ------------------------------
    Amira Romdhane
    ------------------------------



  • 17.  RE: Nimon for AIX 7.3

    Posted 2 days ago

    Oh, dear!   I recall seeing this before and it was either an old AIX release - due to missing Tl and SP levels.

    Or it  was upgraded and the user forgot to reboot the new kernel.

    Cat you send me the output from

    • oslevel -s
    • uptime
    • ls -ltr /usr/lib/boot/unix_64

    You could add the njmon option -D - this avoids a few libperfstat library function that cause problems
    but you will be missing. a few stats: paging, disks, disk-paths, net-buffers.

    The error message is saying that the malloc() system call failed but the code has checked the numbers of paths is a positive number.

    This suggests to me it is the "forgot to reboot after and upgrade" issue.

    Send me the info and if this is not a production server try a reboot and retry.

    Cheers, N



    ------------------------------
    Nigel Griffiths - IBM retired
    London, UK
    @mr_nmon
    ------------------------------



  • 18.  RE: Nimon for AIX 7.3

    Posted yesterday

    Hello,

    #root:/tmp/njmon> oslevel -s
    7300-01-02-2319
    You have mail in /usr/spool/mail/root
    #root:/tmp/njmon> uptime
      01:36AM   up 7 days,  17:51,  4 users,  load average: 2.70, 2.64, 2.76
    #root:/tmp/njmon> ls -lrt /usr/lib/boot/unix_64
    -r-xr-xr-x    1 root     system     58068187 Mar 30 2023  /usr/lib/boot/unix_64

    Best Regards,



    ------------------------------
    Amira Romdhane
    ------------------------------



  • 19.  RE: Nimon for AIX 7.3

    Posted 21 hours ago

    Ok that all look fine.

    You rebooted a week ago = that eliminates a lot of potential problems.

    I am compiling on AIX7300-02-01-2346.

    What happened when you try:

    /usr/lbin/nimon -s 30 -k  -i INFLUXDB -p 8086 -x njmon -y test -z test -D

    Notice the -D

    Cant you try running njmon_aix72_v85 -I -s 6 -c 10 -ff

    That should finish in ~1 minute.

    It is actually failing in the malloc. That could be the number of devices returned is in the 1000's or the process ran out of memory space.

    Can you check what the command: ulimit
    returns.

    We should not be hitting this unexpected error/bug.

    I will change the code so it may throw warnings but instead of stopping, it will disable the stats that cause the issue and carries on.



    ------------------------------
    Nigel Griffiths - IBM retired
    London, UK
    @mr_nmon
    ------------------------------



  • 20.  RE: Nimon for AIX 7.3

    Posted 19 hours ago

    Hello, 

    the ulimit command returns: unlimited
    the problem was solved with the -D option.

     ps -ef | grep nimon
        root 31850918        1   0 01:49:03      -  0:03 /usr/lbin/nimon -D -s 30 -k -i INFLUXDB -p 8086 -x njmon -y test -z test 

    Best Regards,



    ------------------------------
    Amira Romdhane
    ------------------------------



  • 21.  RE: Nimon for AIX 7.3

    Posted 15 hours ago

    Hi Nigel,

    Are there plans to include njmon / nimon to be shipped along with the operating system just like how nmon was added back in the day? 



    ------------------------------
    Anand Sivasubramanian
    ------------------------------



  • 22.  RE: Nimon for AIX 7.3

    Posted 14 hours ago

    This should really be a different post.

    Be careful what you wish for!

    • There is no plan to add njmon for AIX to be part of AIX nor delivered with AIX.
    • nmon was a special case as the source code for AIX was never release to the public. Which made the legal ownership position much simpler.
    • nmon was pretty much functionally stable - Actually, I stuffed a load of planned features in to the code at the last minute before handing over the code to AIX development :-) 
    • nmon for Linux was made Open Source.

    njmon is already open source.

    • There is also an issue with it becoming part of AIX.
    • In the past few years I have need adding features a couple of times a year. This would not be possible if the code is part of AIX. First, I would have no access to the code and could not add to it - AIX code is strictly controlled.  Second, new versions of njmon would only come out on a yearly basis along with the AIX releases in December.
    • For example, I am investigating a problem one customer has with a strange malloc() failure. Once it is fixed in would only get release Dec 2025!
    • I still have features to add - first being adding SSL to the socket going to InfluxDB. I have found it impossible to find a worked example of this that work with InfluxDB. There is extra field hardening to add to make it more robust.

    Perhaps, what we should try for is njmon for AIX going into the AIX Open Source Toolbox. making njmon for AIX just a simple .rpm download. What do you think?



    ------------------------------
    Nigel Griffiths - IBM retired
    London, UK
    @mr_nmon
    ------------------------------



  • 23.  RE: Nimon for AIX 7.3

    Posted 8 hours ago

    Making it an rpm would be a great idea. Having it available in AIX toolbox should be in addition to where it is currently available. 



    ------------------------------
    Anand Sivasubramanian
    ------------------------------