pmc-cloud-tools
pmc-cloud-tools copied to clipboard
No output data, only column headers
Hi Brendan,
I am a bit of a noob to low-level performance (might be missing something well known in the 6 person circle ;)). I was going through http://www.brendangregg.com/blog/2017-05-04/the-pmcs-of-ec2.html as a tutorial and when I run the script I just get the column headers, with no delay and a return code of 0.
I am on Ubuntu 14.04 and Linux 3.13.0-129-generic.
Try this
perf stat -e cycles -e cycles -e r4f2e -e r412e -e r00c4 -e r00c5 -e instructions -a -I 1000
It may print out "not supported"
I've had it happen when the perf tool is not installed or the arch doesn't support the needed counters.
I've also stumbled over this, and I think a proper error message might be helpful here. I quickly hacked together a PoC in tlbstat
:
https://github.com/martinvonwittich/pmc-cloud-tools/commit/7bafcd45b8c275fd0cb6c708b342918bcad954fa
Now tlbstat
will report the following errors on my machine:
martin@martin ~/pmc-cloud-tools % ./tlbstat
ERROR: your perf(1) doesn't seem to support the following events:
cycles
dtlb_load_misses.walk_active
dtlb_store_misses.walk_active
itlb_misses.walk_active
instructions
root permissions, a more recent kernel and/or direct hardware access might help.
martin@martin ~/pmc-cloud-tools % sudo ./tlbstat
[sudo] Passwort für martin:
ERROR: your perf(1) doesn't seem to support the following events:
dtlb_load_misses.walk_active
dtlb_store_misses.walk_active
itlb_misses.walk_active
A more recent kernel and/or direct hardware access might help.
I unfortunately haven't found a machine yet where the tools do work, so I can't really test anything besides the error handling :/
If this works properly, I could integrate it in all the scripts and submit a PR.