Comment 0 for bug 976179

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

pt-stalk runs "top -bn1" which means that a single instance of top is ran. The result is that top can't calculate a useful CPU usage because it needs a basis of comparison. From https://bugzilla.redhat.com/show_bug.cgi?id=174619 we read:

The top command calculates %CPU by looking at the change in CPU time values between samples. When you first run it, it has no previous sample to compare to, so these initial values are the percentages since boot. It means you need at least two loops.

Michael discovered this because he specifically wanted historical CPU usage, knowing that it was running high, but the collected top output from pt-stalk was only showing 6% CPU usage--way below reality.

Perhaps we need to run "top -bn$OPT_RUN_TIME".