How to Find CPU Usage in Linux

How to Find CPU Usage in Linux thumbnail
You can monitor your CPU usage in Linux.

The Linux operating system provides multiple ways to monitor CPU (central processing unit) usage. The "top" command shows the total CPU usage, memory usage and the tasks that are currently running. The "mpstat" command shows the CPU usage for each CPU installed on the machine. The "sar" command shows the CPU usage over a period of time. The "top" command is installed by default. The "mpstat" and "sar" commands are installed with the "sysstat" package, which is not installed by default on many distributions.

Instructions

  1. top

    • 1

      Open a terminal window. The terminal window is found under the "System Tools," "Accessories" or "Utilities" sub-menu of the main "Programs" or "Applications" menu, depending on the distribution.

    • 2

      Type the "top" command to show the CPU usage, memory usage and list of tasks being performed by the computer.

    • 3

      Locate the line that begins "CPU(s)" at the top of the output to view the CPU usage.

    mpstat

    • 4

      Open a terminal window.

    • 5

      Install the "sysstat" package using your distribution's package manager. Ubuntu, Debian and Mint users should type the "apt-get install sysstat" command. Red Hat and Fedora users should type the "up2date systat" command.

    • 6

      Type the command "mpstat" to view the CPU usage.

    sar

    • 7

      Open a terminal window.

    • 8

      Install the "sysstat" package using your distribution's package manager.

    • 9

      Type the "sar" command to view the CPU usage for the entire day.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured