diff options
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 |