hawkular / hawkular.github.io

Web presence of Hawkular
Apache License 2.0
9 stars 29 forks source link

Update cpu-demo script for better performances #318

Closed jotak closed 7 years ago

burmanm commented 7 years ago

While I don't think loadavg counts as a CPU usage, this looks fine (other option would have been cut -d' ' -f 1 /proc/loadavg

If you wanted CPU usage, then /proc/stat parsing would have been a good choice (but requires more than one pass)