Beautifully Monitor CPU Utilization in Linux Terminal With Stress Terminal UI

s-tui is a handy CLI utility that allows you to easily and beautifully monitor CPU utilization with graphs and bars.
Warp Terminal

Stress testing is the best way to identify your system's true potential. But it's not always about how much GHz you can push.

The key to knowing the true potential is to test your system under sustained loads as getting the work done under pressure is something we all ask for.

While multiple GUI options exist to monitor the stress, you don't have many user-friendly options for the terminals.

s-tui is one of the rare such tools; the best part is it works well with the mouse too!!

Stress Terminal UI for CPU monitoring in Linux

Stress Terminal UI (s-tui for short) is a CPU monitoring tool that runs entirely within your terminal. It is written in Python and is developed by Alex Manuskin.

Let's have a look at what it has to offer:

Features

Stress Terminal UI offers the following features:

  • Visualize CPU Frequency, Utilization, Temperature, and Power Usage
  • Displays performance dips caused by thermal throttling
  • Lightweight and uses minimal resources
  • Requires no display servers
  • Stress Operation mode for stress testing the CPU
๐Ÿ“ƒ
You'd have to start the s-tui with sudo to monitor power consumption.

Installation

๐Ÿ’ก
Installing s-tui will only allow you to monitor the system so if you want to perform a stress test, make sure to install stress in your system.

There are two ways to install s-tui: Using pip or using the package manager of your system.

Using pip will get you a slightly newer version but requires you to install pip on Ubuntu.

And if you want to use it with pip, here's the command for the installation of s-tui with pip:

pip install s-tui
Using package managers

If you prefer using the system package manager like I do, here's how you do it.

For Ubuntu/Debian base:

sudo apt install s-tui

For Arch base:

sudo pacman -S s-tui

For Fedora/RHEL:

sudo dnf install s-tui stress

Once done, you can start the s-tui by simply executing:

s-tui

Basic usage of s-tui

If you have installed stress utility, there are two modes given to you:

  • Monitor: This shows how the CPU is managing the resources for the ongoing tasks.
  • Stress: It will stress-test your system.

Now, let's have a look at what customization options you get.

Customize what information to show

To change what is being shown on the screen, click on the Graphs under the Control options, and from here, you can remove elements that are not necessary for your case:

customize s-tui in ubuntu

For example, here, I went with temperature and power monitoring only:

monitor power consumption and CPU temprature in Linux

Customize the summary section

The summary section is located after the Visual options and will show the summary for every monitoring element in the text (if you prefer).

And to change what is being shown in the summary section, click on the Summaries and uncheck the unnecessary options:

change the summary section with s-tui

Adding a timer for the stress test

You can also configure the time duration for the stress test in s-tui.

To do so, click on Stress Options and here, you will find Time out where you have to specify the stress test duration in seconds.

Once done, save the changes:

Pretty cool. Isn't it?

More CPU tools and tips for your Linux system

If you just want to display your CPU details, here's a beautiful way for that.

Show CPU Details Beautifully in Linux Terminal With CPUFetch
There are ways to check CPU information on Linux. Probably the most common is the lscpu command that gives you plenty of information about all the CPU cores on your system. You may find CPU information there without installing any additional packages. That works of course. However, I recentlโ€ฆ

If you are coming from Windows and missing CPU-X, here's an alternative you could explore.

CPU-X an Alternative to CPU-Z for Linux
The tech-savvy Windows users might have used CPU-Z. It is an excellent utility for gathering comprehensive system information that is not available through stock applications in Windows. CPU-Z is not available on Linux. Donโ€™t get disheartened! There are multiple ways and tools you can useโ€ฆ

For hardcore terminal users, the command line always provides a way for everything imaginable.

Monitoring CPU and GPU Temperatures in Linux Terminal
This article discusses two simple ways of monitoring CPU and GPU temperatures in the Linux command line.

If you are someone who prefers to have GUI over the terminal, we made a detailed guide on how you can stress test your CPU using GUI and terminal:

How to Stress Test CPU in Linux
Want to stress test your CPU in Linux? Hereโ€™s how you can do it effortlessly.

I hope you will find this guide helpful.

About the author
Sagar Sharma

Sagar Sharma

A software engineer who loves to write about his experience with Linux. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! Youโ€™ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.