diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/src/mkproc | |
download | pcp-debian.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/src/mkproc')
-rwxr-xr-x | qa/src/mkproc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/qa/src/mkproc b/qa/src/mkproc new file mode 100755 index 0000000..cd5cdcf --- /dev/null +++ b/qa/src/mkproc @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Recipe to remake proc archive +# + +rm -f proc.0 proc.index proc.meta + +. $PCP_DIR/etc/pcp.env + +pmcd_pid=`$PCP_PS_PROG $PCP_PS_ALL_FLAGS | grep '[p]mcd' | $PCP_AWK_PROG '{ print $2 }'` +if [ -z "$pmcd_pid" ] +then + echo "Failed to get pmcd PID" + exit 1 +fi + +pmlogger_pid=`$PCP_PS_PROG $PCP_PS_ALL_FLAGS | grep '[p]mlogger -P' | $PCP_AWK_PROG '{ print $2 }'` +if [ -z "$pmlogger_pid" ] +then + echo "Failed to get primary pmlogger PID" + exit 1 +fi + +cat <<End-of-File | $PCP_BINADM_DIR/pmlogger -s 4 -l proc.log proc +log mandatory on 500msec { + hinv + proc [$pmcd_pid,$pmlogger_pid] + kernel + disk +} +End-of-File |