Glam Prestige Journal

Bright entertainment trends with youth appeal.

Is there any GUI available in Ubuntu which shows detailed CPU usage, including L1/L2 cache usage? So that while running a custom program, I can monitor the CPU utilization in detail.

The default system monitor only shows the overall cpu utilization, but I'd like to also monitor the cache utilization / usage, and see how my code can affect it.

1

1 Answer

I seem to have proven my above comment incorrect. With perf, you can view system cache information much the same way ps will let you monitor cache hits/misses, which is just as good as anything else, as the cache is fully loaded as soon as enough data/instructions pass through it to fill it. Be aware that linux-tools (the package installed by apt for you to user perf) is kernel-specific. for instance when I went to install, I originally ran sudo apt-get install linux-tools-common, which then told me to install the correct version for my system (it even knew which kernel I was using!)

The link above suggests the command:

perf stat -e L1-dcache-loads -e L1-dcache-load-misses echo test test

Which didn't work on my system, likely due to the ancient 32-bit Intel Core Duo sitting in here (got a not supported return value). Newer systems I would expect to work more willingly, but your mileage may vary.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy