This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
software:performance_co-pilot:compiling [2023/10/19 09:03] – [Running the qa suite] chris | software:performance_co-pilot:compiling [2023/10/23 12:36] (current) – removed chris | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Compiling on RHEL7 ===== | ||
- | * install rhel7.5 x86_64 | ||
- | < | ||
- | # activate base and optional channels | ||
- | yum install \ | ||
- | https:// | ||
- | |||
- | yum -y install git flex python-devel make tar \ | ||
- | bison perl-ExtUtils-MakeMaker.noarch gcc-c++ | ||
- | |||
- | mkdir /pcpserv && cd /pcpserv | ||
- | git clone https:// | ||
- | cd pcp | ||
- | ./Makepkgs | ||
- | cd ./ | ||
- | ./ | ||
- | here=`pwd` | ||
- | ( cd /; tar xpf $here/ | ||
- | ./ | ||
- | systemctl start pmcd | ||
- | systemctl status pmcd | ||
- | pminfo | ||
- | |||
- | # ./configure --prefix=/ | ||
- | # make | ||
- | # make install | ||
- | </ | ||
- | |||
- | ===== Compiling on RHEL8 ===== | ||
- | * install RHEL8.2 | ||
- | < | ||
- | yum -y install git flex make tar \ | ||
- | bison perl-ExtUtils-MakeMaker.noarch gcc-c++ \ | ||
- | python3-devel rpm-build initscripts ncurses-devel \ | ||
- | readline-devel zlib-devel autoconf systemd-devel | ||
- | |||
- | # libuv-devel needs to be installed, so pmproxy can | ||
- | # communicate with grafana. | ||
- | | ||
- | # ensure pcp user/group exist. | ||
- | # 'make install' | ||
- | useradd pcp | ||
- | |||
- | mkdir /pcpserv && cd /pcpserv | ||
- | git clone https:// | ||
- | cd pcp | ||
- | ./Makepkgs | ||
- | cd ./ | ||
- | |||
- | # install rpms, i.e. for pcp-6 | ||
- | dnf localinstall pcp-6.*.x86_64.rpm pcp-libs-6.*.x86_64.rpm \ | ||
- | pcp-conf-6.*.x86_64.rpm pcp-zeroconf-6.*.x86_64.rpm \ | ||
- | pcp-doc-6.*.noarch.rpm pcp-pmda-dm-6.*.x86_64.rpm \ | ||
- | pcp-pmda-nfsclient-6.*.x86_64.rpm pcp-system-tools-6.*.x86_64.rpm \ | ||
- | pcp-pmda-netcheck-6.*.x86_64.rpm python3-pcp-6.*.x86_64.rpm \ | ||
- | pcp-pmda-openmetrics-6.*.x86_64.rpm | ||
- | |||
- | systemctl start pmcd | ||
- | systemctl status pmcd | ||
- | pminfo | ||
- | </ | ||
- | |||
- | ===== Compiling on Fedora38 ===== | ||
- | < | ||
- | dnf -y install git flex python-devel make tar bison gcc-c++ \ | ||
- | perl-ExtUtils-MakeMaker.noarch gcc-c++ python3-devel rpm-build \ | ||
- | initscripts ncurses-devel readline-devel zlib-devel \ | ||
- | systemd-devel autoconf libselinux-devel \ | ||
- | setools-console libsemanage-devel selinux-policy-devel | ||
- | | ||
- | # ensure pcp user/group exist. | ||
- | # 'make install' | ||
- | useradd pcp | ||
- | |||
- | mkdir /pcpserv && cd /pcpserv | ||
- | git clone https:// | ||
- | cd pcp | ||
- | ./Makepkgs | ||
- | cd ./ | ||
- | |||
- | # remove existing pcp rpms | ||
- | rpm -evh $(rpm -qa|grep pcp|grep -v grafana|xargs) | ||
- | |||
- | # install rpms | ||
- | dnf localinstall pcp-6*x86_64.rpm pcp-libs-6.*x86_64.rpm \ | ||
- | pcp-conf-6.*x86_64.rpm pcp-selinux-6.*x86_64.rpm \ | ||
- | pcp-pmda-denki-6.*x86_64.rpm pcp-zeroconf-6.*x86_64.rpm \ | ||
- | pcp-system-tools-6.*x86_64.rpm pcp-doc-6.*noarch.rpm \ | ||
- | pcp-pmda-dm-6.*rpm pcp-pmda-nfsclient-6.*rpm \ | ||
- | pcp-pmda-openmetrics-6.*rpm python3-pcp-6.*rpm \ | ||
- | pcp-devel-6.*x86_64.rpm pcp-libs-devel-6.*x86_64.rpm | ||
- | |||
- | # dnf localinstall pcp-testsuite-6.0.0-1.x86_64.rpm \ | ||
- | # | ||
- | # | ||
- | |||
- | systemctl start pmcd | ||
- | systemctl status pmcd | ||
- | pminfo | ||
- | </ | ||
- | |||
- | ===== Running the qa suite ===== | ||
- | < | ||
- | # install required packages | ||
- | yum localinstall pcp-testsuite-6*rpm pcp-pmda*rpm pcp-debuginfo*rpm \ | ||
- | perl-PCP-PMDA-6*rpm | ||
- | |||
- | # preparing for QA tests | ||
- | useradd -m pcpqa | ||
- | echo ' | ||
- | mkdir ~pcpqa/.ssh | ||
- | cp / | ||
- | chown -R pcpqa:pcpqa ~pcpqa/.ssh / | ||
- | |||
- | # now change into user pcpqa.. | ||
- | su - pcpqa | ||
- | cd / | ||
- | ./chk.setup | ||
- | admin/ | ||
- | ./check 000 | ||
- | |||
- | $ cat ~/ | ||
- | [user] | ||
- | email = chorn@< | ||
- | name = Christian Horn | ||
- | [push] | ||
- | default = simple | ||
- | </ | ||
- | |||
- | ===== Own branches ===== | ||
- | < | ||
- | # checkout own branch | ||
- | git clone -b fix-lmsensors-parser \ | ||
- | https:// | ||
- | | ||
- | # modify files | ||
- | git commit . | ||
- | git push | ||
- | |||
- | # pylint --output-format=colorized pmdalmsensors.python | ||
- | # pylint --rcfile=/ | ||
- | --output-format=colorized pmdalmsensors.python | ||
- | </ | ||
- | |||
- | |||
- | ===== stripping down pmlogger metrics ===== | ||
- | You might just archive metrics with pmlogger for creating graphs with grafana, and not want to use them for debugging. In that case, you could | ||
- | |||
- | * initially run pmlogger with the metrics suggested by pcp-zeroconf | ||
- | * then create dashboard which show everything you need. While doing that, you might add metrics to the pmlogger config, so they get archived. | ||
- | * once you are happy, you can use the dashboard json-code to understand which metrics you use, and create a new config which only contains _these_ metrics. | ||
- | |||
- | I used this workflow: | ||
- | * 'sudo dnf -y install xclip' | ||
- | * in your dashboard, go on the top to ' | ||
- | * click 'json model', | ||
- | < | ||
- | # then, in a terminal use this to store the dashboard json | ||
- | xclip -o -selection clipboard > | ||
- | |||
- | # lets now extract the sources | ||
- | grep expr grafana.json | sed -e ' | ||
- | |||
- | Some values from there should be collapsed, for example | ||
- | lmsensors.acpitz_acpi_0.temp1 | ||
- | lmsensors.coretemp_isa_0000.core_0 | ||
- | lmsensors.coretemp_isa_0000.core_1 | ||
- | into | ||
- | lmsensors | ||
- | ..which will capture all the deeper metrics. | ||
- | |||
- | # Then use the metrics in file | ||
- | # / | ||
- | ###### | ||
- | log advisory on default { | ||
- | lmsensors | ||
- | kernel.all.load | ||
- | mem.util.cached | ||
- | mem.physmem | ||
- | mem.util.free | ||
- | kernel.percpu.cpu.user | ||
- | kernel.percpu.cpu.sys | ||
- | kernel.all.pswitch | ||
- | kernel.all.runnable | ||
- | mem.util.used | ||
- | mem.util.cached | ||
- | mem.util.free | ||
- | mem.vmstat.pgfault | ||
- | mem.vmstat.pgmajfault | ||
- | network.interface.in.bytes | ||
- | network.interface.out.bytes | ||
- | network.interface.in.drops | ||
- | network.interface.out.drops | ||
- | network.interface.in.packets | ||
- | network.interface.in.packets | ||
- | network.tcp.timeouts | ||
- | network.tcp.listenoverflows | ||
- | network.tcp.listendrops | ||
- | network.tcp.retranssegs | ||
- | network.tcp.fastretrans | ||
- | network.tcp.slowstartretrans | ||
- | network.tcp.synretrans | ||
- | disk.dev.read_rawactive | ||
- | disk.dev.write_rawactive | ||
- | disk.dev.read | ||
- | disk.dev.write | ||
- | disk.dev.read_bytes | ||
- | disk.dev.write_bytes | ||
- | disk.dev.avactive | ||
- | } | ||
- | |||
- | [access] | ||
- | disallow .* : all; | ||
- | disallow :* : all; | ||
- | allow local:* : enquire; | ||
- | ### | ||
- | |||
- | systemctl restart pmlogger | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ===== Hints ===== | ||
- | * [[https:// | ||
- | * pmproxy debugging | ||
- | < | ||
- | # Grafana shows only 1 week old data, but archive files with 2 weeks old data exist | ||
- | |||
- | # looking at grafana query: | ||
- | http:// | ||
- | 4b8c265752bd81ab18b4d8a45802c& | ||
- | |||
- | # performing query manually | ||
- | curl ' | ||
- | [{" | ||
- | |||
- | => I always get " | ||
- | Also querying for start=1000000000 does not change that | ||
- | |||
- | => Verify with pmrep on commandline if older data is available: | ||
- | pmrep -a 20200415.0 kernel.all.load -p -s 1000000000 \ | ||
- | -f ' | ||
- | | ||
- | 1 minute | ||
- | |||
- | 2020-04-15 00: | ||
- | 2020-04-15 00: | ||
- | 2020-04-15 00: | ||
- | 2020-04-15 00: | ||
- | 2020-04-15 00: | ||
- | 2020-04-15 00: | ||
- | 2020-04-15 00: | ||
- | => Data is there.. | ||
- | </ |