-
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:performancecopilot/pcp
- Loading branch information
Showing
36 changed files
with
1,694 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
# PCP QA Test No. 1570 | ||
# Exercise compressed archive files - zstd version | ||
# | ||
# Copyright (c) 2014 Red Hat. | ||
# Copyright (c) 2010,2024 Ken McDonell. All Rights Reserved. | ||
# | ||
|
||
seq=`basename $0` | ||
echo "QA output created by $seq" | ||
|
||
. ./common.compress | ||
|
||
which zstd >/dev/null 2>&1 || _notrun No zstd binary installed | ||
|
||
status=1 # failure is the default! | ||
$sudo rm -rf $tmp $tmp.* $seq.full | ||
trap "cd $here; rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15 | ||
|
||
# real QA test starts here | ||
_prepare_compress "zstd --rm --quiet --no-progress" "unzstd --rm --quiet --no-progress" zst | ||
_exercise_compression | ||
|
||
status=0 # success, we're all done | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
QA output created by 1570 | ||
expect only a few lines of diff output ... | ||
|
||
--- zstd --rm --quiet --no-progress first volume --- | ||
> pmdumplog ... | ||
> pminfo ... | ||
> pmprobe in the middle ... | ||
> pmval & pmval -r ... | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin | ||
> pmie ... | ||
|
||
--- zstd --rm --quiet --no-progress last volume and use existing .9.zst in -a arg --- | ||
> pmdumplog ... | ||
> pminfo ... | ||
> pmprobe in the middle ... | ||
> pmval & pmval -r ... | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin.9.zst | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin.9.zst | ||
> pmie ... | ||
|
||
--- zstd --rm --quiet --no-progress middle volume and used existing .1 in -a arg --- | ||
> pmdumplog ... | ||
> pminfo ... | ||
> pmprobe in the middle ... | ||
> pmval & pmval -r ... | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin.1 | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin.1 | ||
> pmie ... | ||
|
||
--- zstd --rm --quiet --no-progress first, middle and last volume and use .meta in -a arg --- | ||
> pmdumplog ... | ||
> pminfo ... | ||
> pmprobe in the middle ... | ||
> pmval & pmval -r ... | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin.meta | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin.meta | ||
> pmie ... | ||
|
||
--- zstd --rm --quiet --no-progress first few, middle and last few volumes and use existing .7.zst in -a arg --- | ||
> pmdumplog ... | ||
> pminfo ... | ||
> pmprobe in the middle ... | ||
> pmval & pmval -r ... | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin.7.zst | ||
< archive: tmparch/mv-bigbin | ||
--- | ||
> archive: mv-bigbin.7.zst | ||
> pmie ... | ||
|
||
--- some error cases --- | ||
pminfo: Cannot open archive "mv-bigbin.10": No such file or directory | ||
pmprobe: Cannot open archive "mv-bigbin.10": No such file or directory | ||
pmval: Cannot open archive "mv-bigbin.10": No such file or directory | ||
pmie: cannot open archive mv-bigbin.10 | ||
pmNewContext failed: No such file or directory | ||
pminfo: Cannot open archive "mv-bigbin.10.zst": No such file or directory | ||
pmprobe: Cannot open archive "mv-bigbin.10.zst": No such file or directory | ||
pmval: Cannot open archive "mv-bigbin.10.zst": No such file or directory | ||
pmie: cannot open archive mv-bigbin.10.zst | ||
pmNewContext failed: No such file or directory | ||
--- compressed empty data volume --- | ||
pminfo: Cannot open archive "null": Empty archive file | ||
--- empty data volume pretending to be compressed --- | ||
zstd: ./null.0.zst: unexpected end of file | ||
pminfo: Cannot open archive "null": Corrupted record in a PCP archive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
#!/bin/sh | ||
# PCP QA Test No. 1571 | ||
# pmlogger_rewrite with xz compression | ||
# ... based on No. 676 | ||
# | ||
# Copyright (c) 2018,2024 Ken McDonell. All Rights Reserved. | ||
# | ||
|
||
seq=`basename $0` | ||
echo "QA output created by $seq" | ||
|
||
# get standard environment, filters and checks | ||
. ./common.product | ||
. ./common.filter | ||
. ./common.check | ||
|
||
if which xz >/dev/null 2>&1 | ||
then | ||
PROG="xz -0 --block-size=10MiB" | ||
SUFF=xz | ||
else | ||
_notrun "cannot find a xz compression program!" | ||
fi | ||
|
||
_cleanup() | ||
{ | ||
cd $here | ||
$sudo rm -rf $tmp $tmp.* | ||
} | ||
|
||
_filter() | ||
{ | ||
sed \ | ||
-e "s@$tmp@TMP@g" \ | ||
# end | ||
} | ||
|
||
status=1 # failure is the default! | ||
$sudo rm -rf $tmp $tmp.* $seq.full | ||
trap "_cleanup; exit \$status" 0 1 2 3 15 | ||
|
||
# setup the log farm | ||
# | ||
cat <<End-of-File >$tmp.farm | ||
onevol archives/snort-disks 20011002 | ||
onevol archives/moomba.client 20011003 | ||
multivol archives/ok-mv-bar 20011002 | ||
End-of-File | ||
|
||
mkdir $tmp | ||
if ./mk.logfarm -c $tmp.farm $tmp >$tmp.out 2>&1 | ||
then | ||
_filter <$tmp.out | ||
else | ||
cat $tmp.out | ||
echo "Arrgh ... mk.logfarm failed!" | ||
exit | ||
fi | ||
|
||
# real QA test starts here | ||
cd $tmp | ||
|
||
echo | ||
echo "--- rewrite with data volume compression for multivol ---" | ||
cat <<End-of-File >$tmp.rewrite | ||
metric pmcd.pmlogger.port { | ||
pmid -> 2.4095.1023 | ||
} | ||
End-of-File | ||
for file in multivol/*.[0-9] | ||
do | ||
$PROG $file | ||
done | ||
$PCP_BINADM_DIR/pmlogger_rewrite -VV -c $tmp.rewrite onevol/*.meta multivol/*.meta | ||
for arch in onevol/*.meta multivol/*.meta | ||
do | ||
arch=`echo $arch | sed -e 's/.meta//'` | ||
echo $arch: | ||
pminfo -a $arch -m pmcd.pmlogger.port | ||
done | ||
rm -rf onevol multivol | ||
cd $here | ||
if ./mk.logfarm -c $tmp.farm $tmp >$tmp.out 2>&1 | ||
then | ||
: | ||
else | ||
cat $tmp.out | ||
echo "Arrgh ... mk.logfarm failed!" | ||
exit | ||
fi | ||
cd $tmp | ||
|
||
echo | ||
echo "--- rewrite with metadata and volume compression for onevol and multivol ---" | ||
cat <<End-of-File >$tmp.rewrite | ||
metric pmcd.pmlogger.port { | ||
pmid -> 2.4095.1023 | ||
} | ||
End-of-File | ||
for file in multivol/*.[0-9] multivol/*.meta onevol/*.[0-9] onevol/*.meta | ||
do | ||
$PROG $file | ||
done | ||
$PCP_BINADM_DIR/pmlogger_rewrite -VV -c $tmp.rewrite onevol/*.meta* multivol/*.meta* | ||
for arch in onevol/*.meta* multivol/*.meta* | ||
do | ||
arch=`echo $arch | sed -e 's/.meta.*//'` | ||
echo $arch: | ||
pminfo -a $arch -m pmcd.pmlogger.port | ||
done | ||
cd $tmp | ||
|
||
# success, all done | ||
status=0 | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
QA output created by 1571 | ||
|
||
--- rewrite with data volume compression for multivol --- | ||
suffix stripping: arg: onevol/20011002.meta -> onevol/20011002 | ||
suffix stripping: arg: onevol/20011003.meta -> onevol/20011003 | ||
suffix stripping: arg: multivol/20011002.meta -> multivol/20011002 | ||
changed: onevol/20011002.0 | ||
changed: onevol/20011002.meta | ||
changed: onevol/20011003.0 | ||
changed: onevol/20011003.meta | ||
changed and recompressed: multivol/20011002.0.xz | ||
changed and recompressed: multivol/20011002.1.xz | ||
changed and recompressed: multivol/20011002.2.xz | ||
changed and recompressed: multivol/20011002.3.xz | ||
changed: multivol/20011002.meta | ||
onevol/20011002: | ||
pmcd.pmlogger.port PMID: 2.4095.1023 | ||
onevol/20011003: | ||
pmcd.pmlogger.port PMID: 2.4095.1023 | ||
multivol/20011002: | ||
pmcd.pmlogger.port PMID: 2.4095.1023 | ||
|
||
--- rewrite with metadata and volume compression for onevol and multivol --- | ||
suffix stripping: arg: onevol/20011002.meta.xz -> onevol/20011002 | ||
suffix stripping: arg: onevol/20011003.meta.xz -> onevol/20011003 | ||
suffix stripping: arg: multivol/20011002.meta.xz -> multivol/20011002 | ||
changed and recompressed: onevol/20011002.0.xz | ||
changed and recompressed: onevol/20011002.meta.xz | ||
changed and recompressed: onevol/20011003.0.xz | ||
changed and recompressed: onevol/20011003.meta.xz | ||
changed and recompressed: multivol/20011002.0.xz | ||
changed and recompressed: multivol/20011002.1.xz | ||
changed and recompressed: multivol/20011002.2.xz | ||
changed and recompressed: multivol/20011002.3.xz | ||
changed and recompressed: multivol/20011002.meta.xz | ||
onevol/20011002: | ||
pmcd.pmlogger.port PMID: 2.4095.1023 | ||
onevol/20011003: | ||
pmcd.pmlogger.port PMID: 2.4095.1023 | ||
multivol/20011002: | ||
pmcd.pmlogger.port PMID: 2.4095.1023 |
Oops, something went wrong.