How to check CPU usage?

0165

You can check CPU usage using several commands in the terminal. Here are a few common methods:

  1. Using top command:

    top
    

    This command provides a real-time view of system processes and their CPU usage.

  2. Using htop command:

    htop
    

    If you have htop installed, it offers a more user-friendly interface for monitoring CPU usage and other system metrics.

  3. Using mpstat command:

    mpstat
    

    This command shows CPU usage statistics. You may need to install the sysstat package to use it.

  4. Using vmstat command:

    vmstat 1
    

    This command provides a snapshot of system performance, including CPU usage, updated every second.

  5. Using ps command:

    ps aux --sort=-%cpu | head
    

    This command lists processes sorted by CPU usage, showing the top CPU-consuming processes.

Choose any of these methods based on your preference and the tools available on your system.

0 Comments

no data
Be the first to share your comment!