[Troubleshooting] Using s-tui (Stress-Terminal UI)

Nam Luong
Nam Luong
  • Updated

Document Scope

s-tui is a terminal-based stress testing and monitoring tool for Linux systems. The name "s-tui" stands for "stress terminal UI." This tool is designed to provide users with a simple and visual way to monitor CPU temperature, frequency, utilization, and power usage while simultaneously running stress tests to evaluate system performance under load.

How to download the tool using the wget command:

wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/s-tui/1.0.0-1/s-tui_1.0.0-1.debian.tar.xz

Example Installation

root@rdlab:/home/exx# wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/s-tui/1.0.0-1/s-tui_1.0.0-1.debian.tar.xz
--2021-08-18 17:42:58--  https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/s-tui/1.0.0-1/s-tui_1.0.0-1.debian.tar.xz
Resolving launchpad.net (launchpad.net)... 91.189.89.223, 91.189.89.222, 2001:67c:1560:8003::8004, ...
Connecting to launchpad.net (launchpad.net)|91.189.89.223|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://launchpadlibrarian.net/462640298/s-tui_1.0.0-1.debian.tar.xz [following]
--2021-08-18 17:42:59--  https://launchpadlibrarian.net/462640298/s-tui_1.0.0-1.debian.tar.xz
Resolving launchpadlibrarian.net (launchpadlibrarian.net)... 91.189.89.229, 91.189.89.228, 2001:67c:1560:8003::8007, ...
Connecting to launchpadlibrarian.net (launchpadlibrarian.net)|91.189.89.229|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2916 (2.8K) [application/octet-stream]
Saving to: ‘s-tui_1.0.0-1.debian.tar.xz’

s-tui_1.0.0-1.debian.tar.xz              100%[==================================================================================>]   2.85K  --.-KB/s    in 0s

2021-08-18 17:43:00 (209 MB/s) - ‘s-tui_1.0.0-1.debian.tar.xz’ saved [2916/2916]
root@rdlab:/home/exx# ls
Desktop  Documents  Downloads  emli_support  Exxact  Music  NVIDIA-Linux-x86_64-470.57.02.run  Pictures  Public  s-tui_1.0.0-1.debian.tar.xz  Templates  Videos
root@rdlab:/home/exx# tar -xf s-tui_1.0.0-1.debian.tar.xz
root@rdlab:/home/exx# ls
debian   Documents  emli_support  Music                              Pictures  s-tui_1.0.0-1.debian.tar.xz  Videos
Desktop  Downloads  Exxact        NVIDIA-Linux-x86_64-470.57.02.run  Public    Templates
root@rdlab:/home/exx/debian# cd debian
root@rdlab:/home/exx/debian# ls
changelog  control  copyright  docs  manpages  rules  source  s-tui.1  watch
root@rdlab:/home/exx/debian# apt-get install s-tui
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 libnetplan0 python3-importlib-metadata python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-more-itertools
  python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python3-psutil python3-urwid
Suggested packages:
  python-psutil-doc python-urwid-doc
The following NEW packages will be installed:
  python3-psutil python3-urwid s-tui
0 upgraded, 3 newly installed, 0 to remove and 64 not upgraded.
Need to get 332 kB of archives.
After this operation, 1,975 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

Get:1 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-psutil amd64 5.5.1-1ubuntu4 [141 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 python3-urwid amd64 2.0.1-3 [159 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 s-tui all 1.0.0-1 [32.1 kB]
Fetched 332 kB in 1s (559 kB/s)
Selecting previously unselected package python3-psutil.
(Reading database ... 191050 files and directories currently installed.)
Preparing to unpack .../python3-psutil_5.5.1-1ubuntu4_amd64.deb ...
Unpacking python3-psutil (5.5.1-1ubuntu4) ...
Selecting previously unselected package python3-urwid.
Preparing to unpack .../python3-urwid_2.0.1-3_amd64.deb ...
Unpacking python3-urwid (2.0.1-3) ...
Selecting previously unselected package s-tui.
Preparing to unpack .../archives/s-tui_1.0.0-1_all.deb ...
Unpacking s-tui (1.0.0-1) ...
Setting up python3-urwid (2.0.1-3) ...
/usr/lib/python3/dist-packages/urwid/tests/test_canvas.py:141: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
  assert result == expected, "got: %r expected: %r" (result, expected)
/usr/lib/python3/dist-packages/urwid/tests/test_canvas.py:145: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
  assert result == expected, "got: %r expected: %r" (result, expected)
/usr/lib/python3/dist-packages/urwid/tests/test_canvas.py:149: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
  assert result == expected, "got: %r expected: %r" (result, expected)
/usr/lib/python3/dist-packages/urwid/tests/test_canvas.py:232: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
  assert result == expected, "got: %r expected: %r" (result, expected)
Setting up python3-psutil (5.5.1-1ubuntu4) ...
Setting up s-tui (1.0.0-1) ...
Processing triggers for man-db (2.9.1-1) ...
root@rdlab:/home/exx/debian#

View from xterm

image2021-8-18_10-50-21.pngFrom here, the top-left shows that you have successfully installed this for 'Monitor' mode but is missing the stress test. I used 'Ctrl+C' to back out of the program to install the 'stress' and 'stress-ng' tools.

root@rdlab:/home/exx# apt-get install stress
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 libnetplan0 python3-importlib-metadata python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-more-itertools
  python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  stress
0 upgraded, 1 newly installed, 0 to remove and 64 not upgraded.
Need to get 18.4 kB of archives.
After this operation, 55.3 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 stress amd64 1.0.4-6 [18.4 kB]
Fetched 18.4 kB in 0s (81.0 kB/s)
Selecting previously unselected package stress.
(Reading database ... 191174 files and directories currently installed.)
Preparing to unpack .../stress_1.0.4-6_amd64.deb ...
Unpacking stress (1.0.4-6) ...
Setting up stress (1.0.4-6) ...
Processing triggers for install-info (6.7.0.dfsg.2-5) ...
Processing triggers for man-db (2.9.1-1) ...
root@rdlab:/home/exx# apt-get install stress-ng
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 libnetplan0 python3-importlib-metadata python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-more-itertools
  python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libipsec-mb0 libjudydebian1 libsctp1
Suggested packages:
  lksctp-tools
The following NEW packages will be installed:
  libipsec-mb0 libjudydebian1 libsctp1 stress-ng
0 upgraded, 4 newly installed, 0 to remove and 64 not upgraded.
Need to get 2,291 kB of archives.
After this operation, 19.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libipsec-mb0 amd64 0.53-1 [491 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libjudydebian1 amd64 1.0.5-5 [94.6 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal/main amd64 libsctp1 amd64 1.0.18+dfsg-1 [7,876 B]
Get:4 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 stress-ng amd64 0.11.07-1 [1,697 kB]
Fetched 2,291 kB in 1s (2,980 kB/s)
Selecting previously unselected package libipsec-mb0.
(Reading database ... 191184 files and directories currently installed.)
Preparing to unpack .../libipsec-mb0_0.53-1_amd64.deb ...
Unpacking libipsec-mb0 (0.53-1) ...
Selecting previously unselected package libjudydebian1.
Preparing to unpack .../libjudydebian1_1.0.5-5_amd64.deb ...
Unpacking libjudydebian1 (1.0.5-5) ...
Selecting previously unselected package libsctp1:amd64.
Preparing to unpack .../libsctp1_1.0.18+dfsg-1_amd64.deb ...
Unpacking libsctp1:amd64 (1.0.18+dfsg-1) ...
Selecting previously unselected package stress-ng.
Preparing to unpack .../stress-ng_0.11.07-1_amd64.deb ...
Unpacking stress-ng (0.11.07-1) ...
Setting up libjudydebian1 (1.0.5-5) ...
Setting up libipsec-mb0 (0.53-1) ...
Setting up libsctp1:amd64 (1.0.18+dfsg-1) ...
Setting up stress-ng (0.11.07-1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
root@rdlab:/home/exx#

Now when reopening s-tui, the 'Stress' mode is no longer N/A.

image2021-8-18_10-57-50.png

I'm remoting into this system. If I click outside of the terminal, clicking back in doesn't allow me to interact with the UI. If this happens, just close it (Ctrl+C) and start up the program (s-tui) again. Once I got back in, I toggled the 'Mode' to 'Stress', and here are the results:

image2021-8-18_11-1-8.png

I remoted in with another terminal to check CPU usage (I counted, and all 48 cores are being stressed at 100%, definitely showing choppy usage).

exx@rdlab:~$ top -b -n 1 > top.txt
exx@rdlab:~$ ls
debian   Documents  emli_support  Music                              Pictures  s-tui_1.0.0-1.debian.tar.xz  top.txt
Desktop  Downloads  Exxact        NVIDIA-Linux-x86_64-470.57.02.run  Public    Templates                    Videos
exx@rdlab:~$ less top.txt
exx@rdlab:~$ top
top - 18:02:47 up 12 min,  3 users,  load average: 47.56, 26.21, 10.78
Tasks: 723 total,  49 running, 674 sleeping,   0 stopped,   0 zombie
%Cpu(s):100.0 us,  0.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  64171.4 total,  61414.4 free,   1674.8 used,   1082.2 buff/cache
MiB Swap:  14336.0 total,  14336.0 free,      0.0 used.  61809.0 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   4651 root      20   0    3856    104      0 R 100.0   0.0   3:45.01 stress
   4662 root      20   0    3856    104      0 R 100.0   0.0   3:45.08 stress
   4670 root      20   0    3856    104      0 R 100.0   0.0   3:45.08 stress
   4671 root      20   0    3856    104      0 R 100.0   0.0   3:45.14 stress
   4673 root      20   0    3856    104      0 R 100.0   0.0   3:45.02 stress
   4676 root      20   0    3856    104      0 R 100.0   0.0   3:44.47 stress
   4679 root      20   0    3856    104      0 R 100.0   0.0   3:45.06 stress
   4685 root      20   0    3856    104      0 R 100.0   0.0   3:45.05 stress
   4642 root      20   0    3856    104      0 R 100.0   0.0   3:45.06 stress
   4643 root      20   0    3856    104      0 R 100.0   0.0   3:45.07 stress
   4644 root      20   0    3856    104      0 R 100.0   0.0   3:45.03 stress
   4645 root      20   0    3856    104      0 R 100.0   0.0   3:45.07 stress
   4646 root      20   0    3856    104      0 R 100.0   0.0   3:44.90 stress
   4647 root      20   0    3856    104      0 R 100.0   0.0   3:43.77 stress
   4648 root      20   0    3856    104      0 R 100.0   0.0   3:45.05 stress
   4649 root      20   0    3856    104      0 R 100.0   0.0   3:45.08 stress
   4652 root      20   0    3856    104      0 R 100.0   0.0   3:45.09 stress
   4653 root      20   0    3856    104      0 R 100.0   0.0   3:45.07 stress
   4654 root      20   0    3856    104      0 R 100.0   0.0   3:45.09 stress
   4655 root      20   0    3856    104      0 R 100.0   0.0   3:45.05 stress
   4656 root      20   0    3856    104      0 R 100.0   0.0   3:45.10 stress
   4658 root      20   0    3856    104      0 R 100.0   0.0   3:45.10 stress
   4659 root      20   0    3856    104      0 R 100.0   0.0   3:45.10 stress
   4660 root      20   0    3856    104      0 R 100.0   0.0   3:45.05 stress
   4661 root      20   0    3856    104      0 R 100.0   0.0   3:45.10 stress
   4663 root      20   0    3856    104      0 R 100.0   0.0   3:45.12 stress
   4665 root      20   0    3856    104      0 R 100.0   0.0   3:45.00 stress
   4666 root      20   0    3856    104      0 R 100.0   0.0   3:45.13 stress
   4667 root      20   0    3856    104      0 R 100.0   0.0   3:45.09 stress
   4668 root      20   0    3856    104      0 R 100.0   0.0   3:45.12 stress
   4669 root      20   0    3856    104      0 R 100.0   0.0   3:45.11 stress
   4672 root      20   0    3856    104      0 R 100.0   0.0   3:45.03 stress
   4674 root      20   0    3856    104      0 R 100.0   0.0   3:45.15 stress
   4675 root      20   0    3856    104      0 R 100.0   0.0   3:45.04 stress
   4677 root      20   0    3856    104      0 R 100.0   0.0   3:45.00 stress
   4678 root      20   0    3856    104      0 R 100.0   0.0   3:45.12 stress
   4680 root      20   0    3856    104      0 R 100.0   0.0   3:45.14 stress
   4681 root      20   0    3856    104      0 R 100.0   0.0   3:45.16 stress
   4682 root      20   0    3856    104      0 R 100.0   0.0   3:44.69 stress
   4683 root      20   0    3856    104      0 R 100.0   0.0   3:45.17 stress
   4684 root      20   0    3856    104      0 R 100.0   0.0   3:45.19 stress
   4686 root      20   0    3856    104      0 R 100.0   0.0   3:45.20 stress
   4687 root      20   0    3856    104      0 R 100.0   0.0   3:45.20 stress
   4688 root      20   0    3856    104      0 R 100.0   0.0   3:45.09 stress
   4689 root      20   0    3856    104      0 R 100.0   0.0   3:44.21 stress
   4657 root      20   0    3856    104      0 R  99.7   0.0   3:44.14 stress
   4664 root      20   0    3856    104      0 R  98.7   0.0   3:45.01 stress
   4650 root      20   0    3856    104      0 R  98.3   0.0   3:43.60 stress
   4515 root      20   0   46424  39156   9128 S   3.0   0.1   0:04.65 s-tui
    417 root      20   0       0      0      0 I   0.3   0.0   0:00.04 kworker/29:1-events
   2224 root      20   0       0      0      0 S   0.3   0.0   0:00.56 nv_queue
   4960 exx       20   0    9944   4552   3176 R   0.3   0.0   0:00.15 top

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.