On 05/15/2016 08:08 AM, Frank Ch. Eigler wrote:
Hi -
since derived metrics are never logged (they're defined client side only),
the above makes the most sense. This is akin to the call to the call to
__pmSetInternalState(PM_STATE_PMCS) in tools such as pmlogextract and other
places. Looks like there are few othertools that need to set this too.
OK, how about:
diff --git a/src/pmlogconf/pmlogconf.sh b/src/pmlogconf/pmlogconf.sh
index 3531c676130e..dfd2e92137f4 100755
--- a/src/pmlogconf/pmlogconf.sh
+++ b/src/pmlogconf/pmlogconf.sh
@@ -28,6 +28,11 @@
# Get standard environment
. $PCP_DIR/etc/pcp.env
+# Clear this part to ensure many short-lived pmprobe children
+# don't waste time analyzing derived metrics.
+PCP_DERIVED_CONFIG=
+export PCP_DERIVED_CONFIG
+
status=1
tmp=`mktemp -d /tmp/pcp.XXXXXXXXX` || exit 1
trap "rm -rf $tmp; exit \$status" 0 1 2 3 15
patch looks good - HOWEVER, thinking about this a bit more, ideally if
a pmlogger config (or pmlogconf config) asks for a derived metric to be logged,
it should expand this and log the leaf operand metrics.
I just ran some tests and if you have a pmlogger config that asks for a
derived metric to be logged, e.g. disk.dev.util, it will be. IMO it would be
more
correct to log the operands (i.e. disk.dev.avactive), and then clients would
derive
disk.dev.util on replay). pmlogger is a bit schizo - it's more a client in many
ways ...
Cheers
|