Veonr navbar logo

Subscribe

Only what you want, nothing extra.

Easy Method to Analyze CPU Usage on Ubuntu Server - It's Stupid simple

Feb 17, 2022

By Shubham Kushwah

Reading time — 2 minutes

Easy Method to Analyze CPU Usage on Ubuntu Server - It's Stupid simple at veonr blog by shubham kushwah

Introduction

Understanding CPU processor usage is critical for measuring system performance. Knowing how to monitor CPU use in Linux via the command line is essential for everyone from Linux enthusiasts to system administrators.

Here we will cover how to check Ubuntu CPU usage - using a variety of methods.

What do you need?

  • A system running on Ubuntu
  • Root level user access

Commands

top

The top command displays a list of all the processes that are currently running. It will also provide information about CPU load, users, and memory usage.

However, if you only want to see the active processes. And hide all the idle ones. Pass the -i flag

top -i

How do you get out of top?

Simply by pressing the key q on your keyboard - while you are in the top interface.

Sorting features in top

  • M - Sort by memory usage
  • N - Sort by PID (Process IDs)
  • P - Sort by CPU usage
  • T - Sort by run time

Usage: You can either turn on CAPS LOCK and then simply type the letter m on your keyboard. Or you can press Shift + m to achieve the same results.

Also try

htop

For a more detailed interface. You can also try running the htop command.

This has a better color coded and optimized viewing panel.

Other packages

This was the simplest method of them all. Using the built in methods without installing any additional packages.

Although if you are interested in trying out other packages. You should have a look at:

  • sysstat
  • nmon
  • sar
  • iostat
  • gnome-system-monitor

Conclusion

There are many ways to check CPU usage in Ubuntu systems.

Here we covered the easiest way to do it without installing any 3rd party packages.

If you found this short guide helpful. Be sure to follow me @shubmakes

And share this with your friends...


🚀 FREE FOR LIMITED TIME

Website Analytics

Do you know where your visitors come from?

© 2024 Veonr. All Rights Reserved