Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 15200  / 3 Years ago, thu, june 24, 2021, 11:13:39

I am just wondering if there's any Ubuntu app that can track my CPU usage.



The problem is that I am currently using a quad core i5,
whilst what I do most in daily usage is just browsing and rails developing.



So I want an app that can analyse my CPU usage so that I can decide switching back to a dual core i3.



Thanks.


More From » cpu

 Answers
2

So I want an app that can analyse my CPU usage




The easiest way for your purposes is to log the CPU load (usage), and then analyze yourself (e.g. with LibreOffice Calc) to find out.




  • /proc/loadavg contains the CPU's average load for the last 1, 5 and 15 minutes, in the form: 0.91 0.48 0.62 3/357 16607 (the first three numbers are what matter)

  • You can log this to a text file, say every fifteen minutes, by making it a cron-job.

  • To do this system-wide, edit /etc/crontab and add this line:




*/15 * * * * root cat /proc/loadavg >> /home/your-username/cpu-load.log



  • You can set to 1 or 5 minutes instead by changing the first parameter to * or */5 instead of */15


  • After a few days of normal use, you can import the log file as text/CSV into LibreOffice Calc, and plot the appropriate column (third for 15 minutes), to see your average load.




If your load doesn't go above 2.00 for any lengthy period of time, that means you can make do with a dual-core processor instead of your current quad-core.






There are many network-based monitoring tools, e.g. Munin, MRTG, Cacti, etc. which can be installed from the repositories, will do the logging and even generate pretty graphs for you, but those are complete overkill for what you need. :-)


[#37405] Friday, June 25, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wenceslockro

Total Points: 494
Total Questions: 127
Total Answers: 97

Location: Chad
Member since Mon, Dec 5, 2022
1 Year ago
;