Ask Different Asked on November 17, 2021
Is there any easy way to get CPU usage on a per core basis at a certain interval throughout the day? (e.g. every 60 seconds)
Notes
Example output:
A csv that resembles:
time, core_1, core_2, core_3, core_4 (etc)
"2020-07-18 15:45:00 UTC", 15%, 12%, 0%, 1%
"2020-07-18 15:46:00 UTC", 100%, 100%, 10%, 3%
"2020-07-18 15:47:00 UTC", 10%, 2%, 0%, 0%
etc etc
There is a tool that can collect this information called glances, which is a command line based monitoring tool that can track all sorts of parameters.
It can be installed via homebrew:
brew install glances
You may need to tinker with the options to get something you're happy with, or parse the data downstream with a different tool, but it can output timestamped, percpu usage (in 60 second intervals) in the following way:
glances --stdout now,percpu --time 60
The results aren't quite what you outlined, but the output can be processed with other tools to get them into a format that you can use.
Answered by Scot on November 17, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP