Skip to content

Commit

Permalink
pcp-tapestat: adds a new tape statistics reporting command
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil Kshirsagar authored and natoscott committed Mar 1, 2017
1 parent 542b852 commit 261b57b
Show file tree
Hide file tree
Showing 8 changed files with 825 additions and 0 deletions.
35 changes: 35 additions & 0 deletions qa/936
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh
# PCP QA Test No. 936
# Exercise the pcp-tapestat command.
#
# Copyright (c) 2017 Red Hat. All Rights Reserved.
#

seq=`basename $0`
echo "QA output created by $seq"

. ./common.python

status=1 # failure is the default!
$sudo rm -rf $tmp $tmp.* $seq.full
trap "rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15

pcp_tapestat="$PCP_BINADM_DIR/pcp-tapestat"
test -x $pcp_tapestat || _notrun "No pcp-tapestat(1) installed"
pcp_tapestat="$python $pcp_tapestat"

archive1="-a $here/archives/pcp-tapestat-archive -t 10 -z"

# real QA test starts here
echo && echo pcp-tapestat output: ctime prefix, precision 2
pcp $archive1 tapestat -x t -P 2

echo && echo pcp-tapestat output: no headers, no idle, precision 5
pcp $archive1 tapestat -x h,noidle -P 5

echo && echo pcp-tapestat output: no extended options, precision 0
pcp $archive1 tapestat -P 0

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

pcp-tapestat output: ctime prefix, precision 2
# Timestamp Device r/s w/s kb_r/s kb_w/s r_pct w_pct o_pct Rs/s o_cnt
Wed Feb 22 00:45:50 2017 NODATA ? ? ? ? ? ? ? ? ?
Wed Feb 22 00:46:00 2017 st0 0.00 278.70 0 2853 0.00 7.78 8.89 0.00 0.00
Wed Feb 22 00:46:10 2017 st0 0.00 278.60 0 2853 0.00 7.78 8.89 0.00 0.00
Wed Feb 22 00:46:20 2017 st0 0.00 278.70 0 2853 0.00 7.78 8.89 0.00 0.00
Wed Feb 22 00:46:30 2017 st0 0.00 278.60 0 2853 0.00 7.78 8.89 0.00 0.00
Wed Feb 22 00:46:40 2017 st0 0.00 278.70 0 2853 0.00 7.78 8.89 0.00 0.00
Wed Feb 22 00:46:50 2017 st0 277.80 0.70 2845 7 6.20 0.02 21.64 0.00 0.00
Wed Feb 22 00:47:00 2017 st0 278.60 0.00 2852 0 6.22 0.00 21.67 0.00 0.00
Wed Feb 22 00:47:10 2017 st0 278.60 0.00 2852 0 6.22 0.00 21.67 0.00 0.00
Wed Feb 22 00:47:20 2017 st0 278.50 0.00 2852 0 6.22 0.00 21.67 0.00 0.00
Wed Feb 22 00:47:30 2017 st0 278.60 0.00 2852 0 6.22 0.00 21.67 0.00 0.00
Wed Feb 22 00:47:40 2017 st0 278.50 0.00 2852 0 6.22 0.00 21.67 0.00 0.00
Wed Feb 22 00:47:50 2017 st0 0.70 0.00 7 0 0.02 0.00 0.05 0.00 0.00
Wed Feb 22 00:48:00 2017 st0 0.00 0.00 0 0 0.00 0.00 0.00 0.00 0.00
Wed Feb 22 00:48:10 2017 st0 0.00 0.00 0 0 0.00 0.00 0.00 0.00 0.00
Wed Feb 22 00:48:20 2017 st0 0.00 0.00 0 0 0.00 0.00 0.00 0.00 0.00
Wed Feb 22 00:48:30 2017 st0 0.00 0.00 0 0 0.00 0.00 0.00 0.00 0.00
Wed Feb 22 00:48:40 2017 st0 0.00 0.00 0 0 0.00 0.00 0.00 0.00 0.00

pcp-tapestat output: no headers, no idle, precision 5
st0 0.00000 278.70000 0 2853 0.00000 7.77587 8.89069 0.00000 0.00020
st0 0.00000 278.60000 0 2853 0.00000 7.77587 8.89069 0.00000 0.00010
st0 0.00000 278.70000 0 2853 0.00000 7.77587 8.89069 0.00000 0.00020
st0 0.00000 278.60000 0 2853 0.00000 7.77587 8.89069 0.00000 0.00010
st0 0.00000 278.70000 0 2853 0.00000 7.77587 8.89069 0.00000 0.00020
st0 277.80000 0.70000 2845 7 6.20049 0.01999 21.64027 0.00000 0.00020
st0 278.60000 0.00000 2852 0 6.21647 0.00000 21.67313 0.00000 0.00010
st0 278.60000 0.00000 2852 0 6.21647 0.00000 21.67313 0.00000 0.00020
st0 278.50000 0.00000 2852 0 6.21647 0.00000 21.67313 0.00000 0.00020
st0 278.60000 0.00000 2852 0 6.21647 0.00000 21.67313 0.00000 0.00010
st0 278.50000 0.00000 2852 0 6.21647 0.00000 21.67313 0.00000 0.00020
st0 0.70000 0.00000 7 0 0.01526 0.00000 0.05319 0.00000 0.00000

pcp-tapestat output: no extended options, precision 0
# Device r/s w/s kb_r/s kb_w/s r_pct w_pct o_pct Rs/s o_cnt
st0 0 279 0 2853 0 8 9 0 0
st0 0 279 0 2853 0 8 9 0 0
st0 0 279 0 2853 0 8 9 0 0
st0 0 279 0 2853 0 8 9 0 0
st0 0 279 0 2853 0 8 9 0 0
st0 278 1 2845 7 6 0 22 0 0
st0 279 0 2852 0 6 0 22 0 0
st0 279 0 2852 0 6 0 22 0 0
st0 278 0 2852 0 6 0 22 0 0
st0 279 0 2852 0 6 0 22 0 0
st0 278 0 2852 0 6 0 22 0 0
st0 1 0 7 0 0 0 0 0 0
st0 0 0 0 0 0 0 0 0 0
st0 0 0 0 0 0 0 0 0 0
st0 0 0 0 0 0 0 0 0 0
st0 0 0 0 0 0 0 0 0 0
st0 0 0 0 0 0 0 0 0 0
Binary file added qa/archives/pcp-tapestat-archive.0
Binary file not shown.
Binary file added qa/archives/pcp-tapestat-archive.index
Binary file not shown.
Binary file added qa/archives/pcp-tapestat-archive.meta
Binary file not shown.
1 change: 1 addition & 0 deletions qa/group
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,7 @@ oldversion
933 pmda.proc local
934 logutil pmieutil local
935 derive local
936 pcp python local
943 pmprobe pmda.proc local
944 pmcd secure local
945 pmlogrewrite pmda.xfs local
Expand Down
Loading

0 comments on commit 261b57b

Please sign in to comment.