Skip to content

Commit

Permalink
Merge branch 'main' into pmcheck-for-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
natoscott committed Apr 2, 2024
2 parents 913e81c + 219105c commit e26be2f
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 17 deletions.
32 changes: 23 additions & 9 deletions qa/1491
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,28 @@ _filter_states()
sed \
-e 's/ *$//' \
-e 's/ active$/ OK/' \
-e '/^pmproxy /s/inactive/OK/' \
-e '/^pmproxy /s/could be activated/OK/' \
-e '/^pmie /s/inactive/OK/' \
-e '/^pmie /s/could be activated/OK/' \
-e '/^pmda-overhead /s/inactive/OK/' \
-e '/^pmda-overhead /s/could be activated/OK/' \
-e '/^zeroconf /s/inactive/OK/' \
-e '/^zeroconf /s/could be activated/OK/' \
-e '/^pmproxy /{
s/inactive/OK/
s/could be activated/OK/
}' \
-e '/^pmie /{
s/inactive/OK/
s/could be activated/OK/
}' \
-e '/^pmda-overhead /{
s/inactive/OK/
s/could be activated/OK/
s/cannot be activated/OK/
s/measure overhead of PCP components/.../
s/not currently available for .*/.../
}' \
-e '/^zeroconf /{
s/inactive/OK/
s/could be activated/OK/
s/cannot be activated/OK/
s/Package$/& .../
s/Package - not currently available for .*/Package .../
}' \
#end
}

Expand All @@ -72,7 +86,7 @@ pmcheck 2>&1 | _filter_states
echo '-- -l --'
pmcheck -l
echo '-- -lv --'
pmcheck -lv
pmcheck -lv | _filter_states
echo '-- -s --'
pmcheck -s 2>&1 | _filter_states

Expand Down
4 changes: 2 additions & 2 deletions qa/1491.out
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ pmproxy
zeroconf
-- -lv --
pmcd Performance Metrics Collection Daemon - local source of performance data
pmda-overhead PCP overhead PMDA - measure overhead of PCP components
pmda-overhead PCP overhead PMDA - ...
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
zeroconf PCP Zeroconf Package ...
-- -s --
pmcd OK
pmda-overhead OK
Expand Down
9 changes: 9 additions & 0 deletions qa/249
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ want == 1 && $3 == "val" {
printf "s/ val=%.4f[0-9]*e+06$/ val=<value-%d>/\n",($4+0.5)/1000000,n
printf "s/ val=%.3f[0-9]*e+06$/ val=<value-%d>/\n",($4+0.5)/1000000,n
printf "s/ val=%.2f[0-9]*e+06$/ val=<value-%d>/\n",($4+0.5)/1000000,n
# once (on bozo, 1 Apr 2024) [not April Fools Day
# joke] I have seen 2668885 -> 2.66888e+06, so need
# to handle the truncation cases as well
#
printf "s/ val=%.6fe+06$/ val=<value-%d>/\n",$4/1000000,n
printf "s/ val=%.5f[0-9]*e+06$/ val=<value-%d>/\n",$4/1000000,n
printf "s/ val=%.4f[0-9]*e+06$/ val=<value-%d>/\n",$4/1000000,n
printf "s/ val=%.3f[0-9]*e+06$/ val=<value-%d>/\n",$4/1000000,n
printf "s/ val=%.2f[0-9]*e+06$/ val=<value-%d>/\n",$4/1000000,n
}
n++
seen[$4] = "y"
Expand Down
8 changes: 7 additions & 1 deletion qa/504
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,19 @@ End-of-File
src/exectest echo not supposed to get here 2>&1 \
| _filter

# note: the fork() does not really fail, the fault injection
# makes it look like the fork() has failed, so we have the
# risk of the output appearing for both parent and child, hence
# the sort | uniq
echo
echo "fork() fails"
cat >$tmp.control <<End-of-File
libpcp/exec.c:4 > 0
End-of-File
src/exectest -- sh -c "sleep 1; echo not supposed to get here" 2>&1 \
| _filter
| _filter \
| sort \
| uniq

echo
echo "pipe() fails"
Expand Down
17 changes: 16 additions & 1 deletion qa/789
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@
#
# Copyright (c) 2019 Ken McDonell. All Rights Reserved.
#
# Note: this test stops working every 5 years when the self-signed
# certificates that Zimbra uses expire.
#
# To fix this and renew Zimbra self-signed certs for 5 years
# modified from ..
# https://forums.zimbra.org/viewtopic.php?t=70594
#
# sudo -u zimbra /opt/zimbra/bin/zmcertmgr createca -new
# sudo -u zimbra /opt/zimbra/bin/zmcertmgr deployca
# sudo -u zimbra /opt/zimbra/bin/zmcertmgr createcrt -new -days 1825
# sudo -u zimbra /opt/zimbra/bin/zmcertmgr deploycrt self
# sudo -u zimbra /opt/zimbra/bin/zmcertmgr viewdeployedcrt
# sudo -u zimbra /opt/zimbra/bin/zmcontrol restart
# sudo systemctl restart zimbra
#

seq=`basename $0`
echo "QA output created by $seq"
Expand Down Expand Up @@ -118,7 +133,7 @@ pminfo zimbra >/dev/null 2>&1 && install_on_cleanup=true
trap "_cleanup; exit \$status" 0 1 2 3 15

# Zimbra is such a CPU-hog, that we really would prefer to NOT have
# it running for a PCP build and QA run ... so start it her if needs
# it running for a PCP build and QA run ... so start it here if needs
# be, but remember state so we can put it back
#
if [ "$PCPQA_SYSTEMD" = yes ]
Expand Down
4 changes: 2 additions & 2 deletions qa/admin/pcp-daily
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ do
vm33)
# Only selected groups at this stage for OpenBSD
#
[ X"$what" = Xall ] && check_what='-g sanity -g trace -g libpcp -g kernel -g pmcd -g pminfo -g pmlogger -g pmrep -g threads -g logutil -g dbpmda'
[ X"$what" = Xall ] && check_what='-g sanity -g trace -g libpcp -g kernel -g pmcd -g pminfo -g pmlogger -g pmrep -g threads -g logutil -g dbpmda -g pmcheck'
;;

vm35)
Expand Down Expand Up @@ -926,7 +926,7 @@ do
vm37)
# Only selected groups this stage for OpenBSD
#
[ X"$what" = Xall ] && check_what='-g sanity -g trace -g libpcp -g kernel -g pmcd -g pminfo -g pmlogger -g pmrep -g threads -g logutil -g dbpmda'
[ X"$what" = Xall ] && check_what='-g sanity -g trace -g libpcp -g kernel -g pmcd -g pminfo -g pmlogger -g pmrep -g threads -g logutil -g dbpmda -g pmcheck'
;;

vm38)
Expand Down
2 changes: 1 addition & 1 deletion src/pmcheck/checkproc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ _ctl_svc()
then
runlevel=`runlevel | cut -d ' ' -f 2`
state=`chkconfig --list $svc 2>/dev/null | sed -e "s/.*$runlevel://" -e 's/[ ].*//'`
if [ "$state" = off ]
if [ "$state" = off -o -z "$state" ]
then
if $show_me
then
Expand Down
2 changes: 1 addition & 1 deletion src/pmcheck/pmda.na.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ na="not currently available for `uname -s`"

if $lflag
then
[ "$verbose" -gt 0 ] && echo "PCP $iam PMDA - $na" ]
[ "$verbose" -gt 0 ] && echo "PCP $iam PMDA - $na"
elif $sflag
then
status=2
Expand Down

0 comments on commit e26be2f

Please sign in to comment.