Skip to content

Commit

Permalink
Merge branch 'main' of ../pcp
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcdonell committed Mar 27, 2024
2 parents c4bec38 + cc27ca8 commit 8a5d450
Show file tree
Hide file tree
Showing 19 changed files with 249 additions and 61 deletions.
35 changes: 33 additions & 2 deletions man/man1/pmcheck.1
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,40 @@ or
.BR init (1)
or similar infrastructure layers.
.B _ctl_svc
takes 2 arguments, the first is an action (one of
takes 2 arguments, the first is an
.I action
(one of
.BR state ,
.BR start ,
.BR stop ,
.B activate
(enable and start),
or
.B deactivate
(stop and disable).
(stop and disable),
and the second is the
.I name
of the component;
for
.BR systemctl (1)
managed components,
.I name
should be the basename of the service, e.g.
.B pmcd
for the
.B pmcd.service
.BR systemd (1)
unit, otherwise
.I name
is the name of the
.BR init (1)
or similar ``rc'' script.
.IP \(bu
.B _ctl_svc
will return a value (via
.B $?
when called from a shell script) that matches the exit codes
defined above for each action.
.IP \(bu
A
.B _ctl_pmda
Expand All @@ -335,6 +360,12 @@ is the name of a file providing the input required for
the PMDA's
.I Install
script (defaults to /dev/null).
.IP \(bu
.B _ctl_pmda
will return a value (via
.B $?
when called from a shell script) that matches the exit codes
defined above for each action.
.PD
.PP
So the following is the simplest possible component script for
Expand Down
4 changes: 4 additions & 0 deletions qa/1491.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,31 @@ basic stuff ...
-- no args --
pmcd OK
pmda-overhead OK
pmda-sample OK
pmie OK
pmlogger OK
pmproxy OK
zeroconf OK
-- -l --
pmcd
pmda-overhead
pmda-sample
pmie
pmlogger
pmproxy
zeroconf
-- -lv --
pmcd Performance Metrics Collection Daemon - local source of performance data
pmda-overhead PCP overhead PMDA - measure overhead of PCP components
pmda-sample PCP sample PMDA
pmie PCP Inference Engine - rule-based monitoring
pmlogger PCP Archive logger - record performance data for subsequent replay
pmproxy PCP Proxy Agent - proxy, web and redis integration
zeroconf PCP Zeroconf Package
-- -s --
pmcd OK
pmda-overhead OK
pmda-sample OK
pmie OK
pmlogger OK
pmproxy OK
Expand Down
5 changes: 3 additions & 2 deletions qa/1492
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ _filter()
sed \
-e "s@$tmp@TMP@g" \
-e "s@`pmdate '%Y/%m/%d'`@TODAY@" \
-e '/Warning: invalid file descriptor -1 in syscall/d' \
# end
}

Expand All @@ -70,9 +71,9 @@ sum atop-sar/* >>$seq.full

if $do_valgrind
then
_run_valgrind pcp-atopsar -r atop-sar 180
_run_valgrind pcp -z atopsar -r atop-sar 180
else
pcp atopsar -r atop-sar 180 2>&1
pcp -z atopsar -r atop-sar 180 2>&1
fi \
| _filter

Expand Down
10 changes: 9 additions & 1 deletion qa/1493.out
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,15 @@ QA output created by 1492 --valgrind
=== std err ===
=== filtered valgrind report ===
Memcheck, a memory error detector
Command: pcp-atopsar -r atop-sar 180
Command: /usr/bin/pcp -z atopsar -r atop-sar 180
LEAK SUMMARY:
definitely lost: 0 bytes in 0 blocks
indirectly lost: 0 bytes in 0 blocks
ERROR SUMMARY: 0 errors from 0 contexts ...
LEAK SUMMARY:
definitely lost: 0 bytes in 0 blocks
indirectly lost: 0 bytes in 0 blocks
ERROR SUMMARY: 0 errors from 0 contexts ...
LEAK SUMMARY:
definitely lost: 0 bytes in 0 blocks
indirectly lost: 0 bytes in 0 blocks
Expand Down
81 changes: 81 additions & 0 deletions qa/1505
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/bin/sh
# PCP QA Test No. 1505
# pmcheck ... repeated calls into checkproc.sh functions
# - based on Nathan's Redis PMDA plugin experience
#
# 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

_cleanup()
{
cd $here
$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
}

cat <<'End-of-File' >$tmp.pmcheck
#!/bin/sh
. $PCP_DIR/etc/pcp.env || exit 1
. $PCP_SHARE_DIR/lib/checkproc.sh
_do_args "$@"
myverbose=$verbose
verbose=0
if $sflag
then
_ctl_svc state pmcd
x=$?
[ $FAULT = 1 ] && x=1
if [ "$x" -ne 0 ]
then
status=1
[ $myverbose -gt 0 ] && echo pmcd not running
fi
_ctl_pmda state pmda-sample
x=$?
[ $FAULT = 2 ] && x=1
if [ "$x" -ne 0 ]
then
status=1
[ $myverbose -gt 0 ] && echo sample pmda not running
fi
fi
End-of-File
chmod 755 $tmp.pmcheck

# real QA test starts here
export FAULT
for FAULT in 0 1 2
do
echo
echo "-- FAULT=$FAULT --"
pmcheck -c $tmp.pmcheck -sv 2>&1 | _filter
done

# success, all done
exit
10 changes: 10 additions & 0 deletions qa/1505.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
QA output created by 1505

-- FAULT=0 --
TMP.pmcheck active

-- FAULT=1 --
TMP.pmcheck could be activated pmcd not running

-- FAULT=2 --
TMP.pmcheck could be activated sample pmda not running
3 changes: 3 additions & 0 deletions qa/1805.out
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ network.mptcp.rmaddrtx
network.mptcp.rmaddrtxdrop
value 53

network.mptcp.mpcurrestab
value 54

== Checking network.tcp metrics

network.tcp.rtoalgorithm
Expand Down
1 change: 1 addition & 0 deletions qa/group
Original file line number Diff line number Diff line change
Expand Up @@ -1967,6 +1967,7 @@ x11
1502 pmlogdump local valgrind
1503 pcp pidstat ps python local
1504 pmval archive archive_v3 local multi-archive
1505 pmcheck local
1511 pmcd local pmda.sample
1515 pmda.denki local valgrind
1530 pmda.zfs local valgrind
Expand Down
4 changes: 2 additions & 2 deletions qa/linux/proc_net_netstat
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed EmbryonicRsts PruneCalled
TcpExt: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
IpExt: InNoRoutes InTruncatedPkts InMcastPkts OutMcastPkts InBcastPkts OutBcastPkts InOctets OutOctets InMcastOctets OutMcastOctets InBcastOctets OutBcastOctets InCsumErrors InNoECTPkts InECT1Pkts InECT0Pkts InCEPkts ReasmOverlaps
IpExt: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
MPTcpExt: MPCapableSYNRX MPCapableSYNTX MPCapableSYNACKRX MPCapableACKRX MPCapableFallbackACK MPCapableFallbackSYNACK MPFallbackTokenInit MPTCPRetrans MPJoinNoTokenFound MPJoinSynRx MPJoinSynAckRx MPJoinSynAckHMacFailure MPJoinAckRx MPJoinAckHMacFailure DSSNotMatching InfiniteMapRx DSSNoMatchTCP DataCsumErr OFOQueueTail OFOQueue OFOMerge NoDSSInWindow DuplicateData AddAddr EchoAdd PortAdd AddAddrDrop MPJoinPortSynRx MPJoinPortSynAckRx MPJoinPortAckRx MismatchPortSynRx MismatchPortAckRx RmAddr RmAddrDrop RmSubflow MPPrioTx MPPrioRx MPFailTx MPFailRx MPFastcloseTx MPFastcloseRx MPRstTx MPRstRx RcvPruned SubflowStale SubflowRecover InfiniteMapTx SndWndShared RcvWndShared RcvWndConflictUpdate RcvWndConflict AddAddrTx AddAddrTxDrop EchoAddTx EchoAddTxDrop RmAddrTx RmAddrTxDrop
MPTcpExt: 1 2 3 4 5 6 7 8 9 10 11 22 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 43 44 45 46 40 41 42 43 44 45 46 47 48 49 50 51 52 53
MPTcpExt: MPCapableSYNRX MPCapableSYNTX MPCapableSYNACKRX MPCapableACKRX MPCapableFallbackACK MPCapableFallbackSYNACK MPFallbackTokenInit MPTCPRetrans MPJoinNoTokenFound MPJoinSynRx MPJoinSynAckRx MPJoinSynAckHMacFailure MPJoinAckRx MPJoinAckHMacFailure DSSNotMatching InfiniteMapRx DSSNoMatchTCP DataCsumErr OFOQueueTail OFOQueue OFOMerge NoDSSInWindow DuplicateData AddAddr EchoAdd PortAdd AddAddrDrop MPJoinPortSynRx MPJoinPortSynAckRx MPJoinPortAckRx MismatchPortSynRx MismatchPortAckRx RmAddr RmAddrDrop RmSubflow MPPrioTx MPPrioRx MPFailTx MPFailRx MPFastcloseTx MPFastcloseRx MPRstTx MPRstRx RcvPruned SubflowStale SubflowRecover InfiniteMapTx SndWndShared RcvWndShared RcvWndConflictUpdate RcvWndConflict AddAddrTx AddAddrTxDrop EchoAddTx EchoAddTxDrop RmAddrTx RmAddrTxDrop MPCurrEstab
MPTcpExt: 1 2 3 4 5 6 7 8 9 10 11 22 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 43 44 45 46 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Loading

0 comments on commit 8a5d450

Please sign in to comment.