How can I add the current CPU usage to my menu bar as a percentage?

I'm used to OS X and I use MenuMeters in my menu bar to monitor CPU usage as a percentage and memory as used/free totals. I really want to add this functionality in Ubuntu as I'm using it for development. I've seen that you can add graphs. Graphs mean nothing to me :). I need percentages. How can I add this functionality in Ubuntu?


Solution 1:

There is no need to add any extra repository, just install indicator-multiload from the default repos:

sudo apt install indicator-multiload

Then start it manually the first time by searching for "system load indicator" in the dashboard.

Right click the indicator for preferences.

example

Solution 2:

The system load indicator can be configured to display numeric values. First make sure that indicator-multiload is installed:

sudo apt install indicator-multiload

Do the following steps:

  1. Search for System Load Indicator in dash and launch it.enter image description here
  2. Right click on the indicator applet and choose Preferences. enter image description here
  3. A window will pop up. Click on the Indicator Items... button on the lower middle portion of the window. enter image description here
  4. Move the item CPU $(percent(cpu,inuse)) to the top of the list. enter image description here
  5. Close all opened windows and notice the numerical CPU load displayed in the panel. enter image description here
  6. Note that the entry is customizable. You can get creative and start mixing up different entries. For example, if you want to display memory usage as well, replace the entry with CPU $(percent(cpu.inuse)) Mem $(size(mem.user)), which will result in: enter image description here

Solution 3:

The "indicator multiload" is the one you are searching for. The commands to install:

sudo add-apt-repository ppa:indicator-multiload/stable-daily 
sudo apt-get update 
sudo apt-get install indicator-multiload

Read more about it at this link : webupd8

Update: Now indicator-multiload is available in the official PPA as suggested by other answers. However, if you want the latest version, install it from the PPA indicator-multiload/stable-daily.

Solution 4:

Use Gnome shell system monitor extension (works with Ubuntu 18.04LTS too). Install prerequisite:

sudo apt-get install gir1.2-gtop-2.0, gir1.2-networkmanager-1.0 gir1.2-clutter-1.0 gir1.2-clutter-gst-3.0 gir1.2-gtkclutter-1.0 chrome-gnome-shell

Then visit https://extensions.gnome.org/extension/120/system-monitor/, preferably in Firefox, and install by clicking the toggle button next to the extension's name.

For more info on installation see: https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet