Skip to content

Commit

Permalink
Merge branch 'main' of github.com:performancecopilot/pcp
Browse files Browse the repository at this point in the history
  • Loading branch information
natoscott committed Sep 30, 2024
2 parents 966937c + 66553f3 commit d2da855
Show file tree
Hide file tree
Showing 33 changed files with 1,884 additions and 189 deletions.
6 changes: 6 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
deb
pack_pcp.bin
GNUlocaldefs
Debian-*
Fedora-*
MX-*
RHEL-*
Ubuntu-*
deb-*
101 changes: 90 additions & 11 deletions debian/control.pcp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Standards-Version: 3.9.3
X-Python3-Version: >= 3.3

Package: pcp
Depends: ${shlibs:Depends}, ${misc:Depends}, gawk, procps, ?{python-pcp}, ?{python}, libpcp-pmda3 (= ${binary:Version}), libpcp-mmv1 (= ${binary:Version}), libpcp-web1 (= ${binary:Version}), libpcp-archive1 (= ${binary:Version}), libpcp3 (= ${binary:Version}), pcp-conf (>= 6.3.1)
Depends: ${shlibs:Depends}, ${misc:Depends}, gawk, procps, ?{python-pcp}, ?{python}, libpcp-pmda3 (= ${binary:Version}), libpcp-mmv1 (= ${binary:Version}), libpcp-web1 (= ${binary:Version}), libpcp-archive1 (= ${binary:Version}), libpcp3 (= ${binary:Version}), pcp-conf (= ${binary:Version})
Recommends: libpcp-pmda-perl
Conflicts: pgpool2, dstat, pcp-webapi, pcp-manager
Suggests: pcp-gui, libpcp-import-perl, ?{bpftrace}, ?{python3-bpfcc}, redis-server
Expand Down Expand Up @@ -60,8 +60,9 @@ Description: Performance Co-Pilot library and headers

Package: libpcp3
Depends: ${shlibs:Depends}, ${misc:Depends}, pcp-conf (= ${binary:Version})
Conflicts: pgpool2, libpcp3t64
Breaks: pcp (<< 2.8.0), libpcp3-dev (<< 2.8.5)
Conflicts: pgpool2
Breaks: pcp (<< 2.8.0), libpcp3-dev (<< 2.8.5), libpcp3t64 (<< 6.3.2)
Replaces: libpcp3t64 (<< 6.3.2)
Section: libs
Architecture: any
Description: Performance Co-Pilot library
Expand Down Expand Up @@ -90,7 +91,8 @@ Description: Performance Co-Pilot graphical client tools library and headers

Package: libpcp-gui2
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: libpcp-gui2t64
Breaks: libpcp-gui2t64 (<< 6.3.2)
Replaces: libpcp-gui2t64 (<< 6.3.2)
Section: libs
Architecture: any
Description: Performance Co-Pilot graphical client tools library
Expand Down Expand Up @@ -118,7 +120,8 @@ Description: Performance Co-Pilot Memory Mapped Value library and headers

Package: libpcp-mmv1
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: libpcp-mmv1t64
Breaks: libpcp-mmv1t64 (<< 6.3.2)
Replaces: libpcp-mmv1t64 (<< 6.3.2)
Section: libs
Architecture: any
Description: Performance Co-Pilot Memory Mapped Value client library
Expand Down Expand Up @@ -151,7 +154,8 @@ Description: Performance Co-Pilot Domain Agent library and headers

Package: libpcp-pmda3
Depends: ${misc:Depends}, ${shlibs:Depends}
Conflicts: libpcp-pmda3t64
Breaks: libpcp-pmda3t64 (<< 6.3.2)
Replaces: libpcp-pmda3t64 (<< 6.3.2)
Section: libs
Architecture: any
Description: Performance Co-Pilot Domain Agent library
Expand All @@ -178,7 +182,8 @@ Description: Performance Co-Pilot application tracing library and headers

Package: libpcp-trace2
Depends: ${misc:Depends}, ${shlibs:Depends}
Conflicts: libpcp-trace2t64
Breaks: libpcp-trace2t64 (<< 6.3.2)
Replaces: libpcp-trace2t64 (<< 6.3.2)
Section: libs
Architecture: any
Description: Performance Co-Pilot application tracing library
Expand Down Expand Up @@ -208,7 +213,8 @@ Description: Performance Co-Pilot data import library and headers

Package: libpcp-import1
Depends: ${misc:Depends}, ${shlibs:Depends}
Conflicts: libpcp-import1t64
Breaks: libpcp-import1t64 (<< 6.3.2)
Replaces: libpcp-import1t64 (<< 6.3.2)
Section: libs
Architecture: any
Description: Performance Co-Pilot data import library
Expand Down Expand Up @@ -238,7 +244,8 @@ Description: Performance Co-Pilot web tooling

Package: libpcp-web1
Depends: ${misc:Depends}, ${shlibs:Depends}
Conflicts: libpcp-web1t64
Breaks: libpcp-web1t64 (<< 6.3.2)
Replaces: libpcp-web1t64 (<< 6.3.2)
Section: libs
Architecture: any
Description: Performance Co-Pilot data import library
Expand Down Expand Up @@ -266,9 +273,9 @@ Description: Performance Co-Pilot archive writing library and headers

Package: libpcp-archive1
Depends: ${misc:Depends}, ${shlibs:Depends}
Conflicts: libpcp-archive1t64
Breaks: pcp (<< 6.0.1), libpcp-archive1t64 (<< 6.3.2)
Replaces: libpcp-archive1t64 (<< 6.3.2)
Section: libs
Breaks: pcp (<< 6.0.1)
Architecture: any
Description: Performance Co-Pilot archive writing library
The libpcp-archive package contains the runtime environment required
Expand Down Expand Up @@ -393,3 +400,75 @@ Description: Performance Co-Pilot (PCP) Test Suite
Provides a series of tests that exercise the many utilities and daemon
processes that form the PCP toolkit. Regular users should never have
any need to install this package, it is for developers and testers only.

Package: libpcp3t64
Depends: libpcp3, ${misc:Depends}
Architecture: any
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package to address incorrect Debian renaming.
It can safely be removed.

Package: libpcp-archive1t64
Depends: libpcp-archive1, ${misc:Depends}
Architecture: any
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package to address incorrect Debian renaming.
It can safely be removed.

Package: libpcp-gui2t64
Depends: libpcp-gui2, ${misc:Depends}
Architecture: any
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package to address incorrect Debian renaming.
It can safely be removed.

Package: libpcp-mmv1t64
Depends: libpcp-mmv1, ${misc:Depends}
Architecture: any
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package to address incorrect Debian renaming.
It can safely be removed.

Package: libpcp-pmda3t64
Depends: libpcp-pmda3, ${misc:Depends}
Architecture: any
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package to address incorrect Debian renaming.
It can safely be removed.

Package: libpcp-trace2t64
Depends: libpcp-trace2, ${misc:Depends}
Architecture: any
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package to address incorrect Debian renaming.
It can safely be removed.

Package: libpcp-web1t64
Depends: libpcp-web1, ${misc:Depends}
Architecture: any
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package to address incorrect Debian renaming.
It can safely be removed.

Package: libpcp-import1t64
Depends: libpcp-import1, ${misc:Depends}
Architecture: any
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package to address incorrect Debian renaming.
It can safely be removed.
4 changes: 2 additions & 2 deletions docs/QG/AutomatedReasoningBasics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ One or more suffix of the form **:hostname** after a metric name changes the set

For example **filesys.free :otherhost** is the most recent set of values for the amount of free space on every mounted file system on the host **otherhost**, and may be represented as follows:

.. figure:: ../../images/filesys.free:.png
.. figure:: ../../images/filesys.free_byhost.png

A suffix of the form **@N..M** after a metric name changes the set of values to be that formed by **all** instances on the default host for pmie, at the sample times **N, N+1, ... M back** from the current time.

And finally more than one type of suffix may be used to control enumeration in each of the three axis directions.

For example **filesys.free #'/usr' @0..3** refers to the default host, restricts the instances and enumerates the time. This may be represented as follows:

.. figure:: ../../images/filesys.free@.png
.. figure:: ../../images/filesys.free_bytime.png


Forms of pmie predicate
Expand Down
File renamed without changes
File renamed without changes
70 changes: 66 additions & 4 deletions man/man1/pmlogextract.1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and merge Performance Co-Pilot archives
[\f3\-s\f1 \f2samples\f1]
[\f3\-T\f1 \f2endtime\f1]
[\f3\-V\f1 \f2version\f1]
[\f3\-v\f1 \f2volsamples\f1]
[\f3\-v\f1 \f2volsize\f1]
[\f3\-Z\f1 \f2timezone\f1]
\f2input\f1 [...] \f2output\f1
.SH DESCRIPTION
Expand Down Expand Up @@ -236,18 +236,80 @@ archive from
archives that could be a mixture of version 2 and/or version 3.
.RE
.TP
\fB\-v\fR \fIvolsamples\fR
\fB\-v\fR \fIvolsize\fR
The
.I output
archive is potentially a multi-volume data set, and the
.B \-v
option causes
.B pmlogextract
to start a new volume after
.I volsamples
records have been written to the archive.
reaching an archive volume size of
.IR volsize .
If
.IR volsize
is an integer then at most
.IR volsize
records will be written to each volume.
If
.IR volsize
is an integer suffixed by
.B b
or
.B bytes
then at most
.IR volsize
bytes will be written out to each volume.
Other viable file size units include:
.BR K ,
.BR Kb ,
.BR KiB ,
.BR Kbyte ,
.BR Kilobyte
for kilobytes and
.BR M ,
.BR Mb ,
.BR MiB ,
.BR Mbyte ,
.BR Megabyte
for megabytes and
.BR G ,
.BR Gb ,
.BR GiB ,
.BR Gbyte ,
.BR Gigabyte
for gigabytes.
These units may be optionally suffixed by an
.B s
and may be of mixed case.
Alternatively
.IR volsize
may be an integer or a floating point number suffixed using a time unit
as described in
.BR PCPIntro (1)
for the
.I interval
argument (to the standard PCP
.BR \-t
command line option).
.nf
Some examples of different formats:
.in +1i
.B \-s 100
.B \-s 100bytes
.B \-s 100K
.B \-s 100Mb
.B \-s 10Gbyte
.B \-s 10mins
.B \-s 1.5hours
.in
.fi
.RS
.PP
The default is for
.B pmlogextract
to produce as few volumes as possible.
.PP
Independent of any
.B \-v
option, each volume of an archive is limited to no more than
Expand Down
4 changes: 2 additions & 2 deletions qa/1521
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ _filter()
-e 's/0xffffffff/0x.../g' \
-e 's/0x[0-9a-f][0-9a-f]*/<addr>/g' \
| $PCP_AWK_PROG '
NF == 1 && $1 >= 0.75 && $1 <= 1.25 { print " close to 1.000"; next }
NF == 1 && $1 >= 7.5 && $1 <= 12.5 { print " close to 10.000"; next }
NF == 1 && $1 >= 0.6 && $1 <= 1.25 { print " close to 1.000"; next }
NF == 1 && $1 >= 6 && $1 <= 12.5 { print " close to 10.000"; next }
{ print }'
# end
}
Expand Down
94 changes: 94 additions & 0 deletions qa/1562
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/bin/sh
# PCP QA Test No. 1562
# pminfo malloc/free botch and bad reporting for dynamic metrics with
# no children (like when a node is left in the PMNS, but the
# corresponding PMDA is not active via pmcd).
#
# non-valgrind variant, see qa/1563 for the valgrind variant
#
# Copyright (c) 2024 Ken McDonell. All Rights Reserved.
#

if [ $# -eq 0 ]
then
seq=`basename $0`
echo "QA output created by $seq"
else
# use $seq from caller, unless not set
[ -n "$seq" ] || seq=`basename $0`
echo "QA output created by `basename $0` $*"
fi

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

$sudo rm -rf $tmp $tmp.* $seq.full

do_valgrind=false
if [ "$1" = "--valgrind" ]
then
_check_valgrind
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
[ "$PCPQA_VALGRIND" = both ] || \
_notrun "valgrind variant qa/1563 will be run"
fi

_cleanup()
{
cd $here
echo "Restore pmcd.conf and restart PMCD ..."
if [ -f $tmp.pmcd.conf ]
then
$sudo cp $tmp.pmcd.conf $PCP_PMCDCONF_PATH
_service pmcd restart 2>&1 | _filter_pcp_start
_wait_for_pmcd
rm -f $tmp.pmcd.conf
fi
$sudo rm -rf $tmp $tmp.*
}

status=0 # success is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15

_filter()
{
sed \
-e "s@$tmp@TMP@g" \
# end
}

# cull the sample PMDA from pmcd.conf, leave names in the PMNS
#
cp $PCP_PMCDCONF_PATH $tmp.pmcd.conf
echo "# Installed by PCP QA test $seq on `date`" >$tmp.tmp
sed -e '/^sample[ ]/s/^/#/' <$PCP_PMCDCONF_PATH >>$tmp.tmp
$sudo cp $tmp.tmp $PCP_PMCDCONF_PATH
_service pmcd restart 2>&1 | _filter_pcp_start

# real QA test starts here

for args in "-b 1 sample.ghosts" \
"sample.ghosts sample.ghosts" \
"-b 1 sample.ghosts sampledso.bin" \
"sampledso.bin sample.ghosts" \
"sample.ghosts sampledso.bin" \
"sample.colour sample.ghosts sample.bin" \
"sampledso.colour sample.ghosts sampledso.bin"
do
echo
echo "=== $args ==="
if $do_valgrind
then
_run_valgrind pminfo -d $args
else
pminfo -d $args
fi \
| _filter
done

# success, all done
exit
Loading

0 comments on commit d2da855

Please sign in to comment.