Not display data from NMon.

Linux agent 6.15, CentOS Linux release 7.7.1908 (Core)

I no see data from NMon. Have errors in log file.

[root@stor2rrd var]# ll /var/nmon
total 4440
-rw-r--r-- 1 root root 2839601 Feb 26 23:59 stor2rrd_200226_0000.nmon
-rw-r--r-- 1 root root 1503144 Feb 27 12:40 stor2rrd_200227_0000.nmon

[root@stor2rrd var]# tail -3 /var/tmp/lpar2rrd-agent-nmon-127.0.0.1-lpar2rrd.err
Thu Feb 27 12:20:02 2020: Exiting as two NMON agents cant run /opt/lpar2rrd-agent/lpar2rrd-agent.pl:377
Thu Feb 27 12:30:02 2020: Exiting as two NMON agents cant run /opt/lpar2rrd-agent/lpar2rrd-agent.pl:377
Thu Feb 27 12:40:02 2020: Exiting as two NMON agents cant run /opt/lpar2rrd-agent/lpar2rrd-agent.pl:377

[root@stor2rrd var]# cat /etc/crontab
#Lpar2RRD Agent
#
* * * * * lpar2rrd /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl 127.0.0.1 > /var/tmp/lpar2rrd-agent.out 2>&1
#
#Lpar2RRD Agent by NMon
#online, every 10 minutes
0,10,20,30,40,50 * * * * lpar2rrd /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl -n /var/nmon 127.0.0.1 > /var/tmp/lpar2rrd-agent-nmon.out 2>&1
#offline, once a day
#0 0 * * * lpar2rrd /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl -n /var/nmon 127.0.0.1 > /var/tmp/lpar2rrd-agent-nmon.out 2>&1
#
#run NMon in the background mode for data collection
0 0 * * * root LANG=C; export LANG; /usr/bin/nmon -m'/var/nmon' -f -t -s60 -c1440 -d1024 -g'/nmon_dgfile' -D
#
#delete NMon log files, older 7 days
0 0 * * * root find /var/nmon/ -type f -mtime +7 -name '*.nmon' -delete

[root@stor2rrd var]# ps -ef | grep nmon
root     21426  6789  0 12:46 pts/1    00:00:00 grep --color=auto nmon
root     22780     1  0 00:00 ?        00:00:19 /usr/bin/nmon -m/var/nmon -f -t -s60 -c1440 -d1024 -g/nmon_dgfile -D

Comments

  • Hi,

    why do you use OS agent and even NMON data thorugh lpar2rrd os agent?
    It just doubles same data.

    send us
    ps -ef| grep lpar2rrd
    ls -ltr /var/tmp/lpar2rrd*
    ls -l /var/nmon | wc -l

    support at stor2rrd dot com


  • Hi, Pavel.

    Why? Because can do it. You say it may do:
    (https://www.ibm.com/developerworks/community/forums/html/topic?id=4b21495b-cf50-47c0-9144-da7b32b8f8f5)

    yes, you can use only NMON  (NMON is independent on the OS agent, both just use the same script/program).

    In fact you have 3 independent options:

    1. NMON only

      /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl -n __NMON_DIR__  __LPAR2RRD-SERVER__

    2. OS agent only

      /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl __LPAR2RRD-SERVER__

    3. both

      /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl -n __NMON_DIR__  __LPAR2RRD-SERVER__

      /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl __LPAR2RRD-SERVER__

    Cheers, Pavel

    :-)

    E-mail on the way.

  • yes, it is possible, just asked :)
  • Pavel, i edited  near string 337, and replase from old script who works with nmon 

    #A#    my @ps        = grep {/$0(?!grep|sh -c)/} `ps -ef 2>>$error_log`;
        my @ps        = `ps -ef 2>>$error_log|grep $0|grep -v grep|grep -v "sh -c"`;

    And it is work!
Sign In or Register to comment.