
ターミナルベースのコンピューターのモニタリングツール「s-tui」。
CPUの周波数や使用率、温度、消費電力などの情報をターミナル上に美しく表示できるユーティリティで、Pythonで作成されています。また単に状態をモニタリングするだけでなく、stressコマンドを利用してマシンに負荷をかけ変化を確認することも可能です。
次のような特徴を持っています。
- CPU温度/使用率/周波数/電力の監視
- サーマルスロットリングによる性能低下の表示
- ミニマルリソース
- X Serverが不要
- CPUストレスのための組み込みオプション
以下具体的な使用方法を説明します。
s-tuiの使用方法
s-tuiはPython製のツールなのでpipコマンドを利用してインストールできます。ターミナルを開き以下のコマンドを実行します。
#ルート権限でインストールする場合 sudo pip install s-tui #ユーザー権限でインストールする場合 pip install s-tui --user #pyenvなどを利用する場合 pip install s-tui
インストール完了後以下のコマンドで実行できます。
s-tui
プログラムが起動すると直後から自動的にCPUのモニタリングが開始します。

▲s-tuiの動作モードは画面左上の「Modes」で変更できます。「Monitor」が通常状態で「Stress」がストレスをかけた状態です。「Stress」はstressコマンドがシステム上に存在する場合に使用可能で、選択するとCPUの負荷が100%となります(Monitorをもう一度選択すると元に戻せます)。
また左中央部の「Frequency(周波数)」「Utilization(使用率)」「Temperature(温度)」「Power(消費電力)」でどの情報を表示するかを選択できます。「X」が画面に表示されている項目ですが、マシンによっては情報が読み取れず「N/A」になる場合もあるようです。
s-tuiはそのまま起動するだけでなく、各種オプションを指定することもできます。詳しくは公式サイトでご確認ください。
********s-tui manual********
usage: s-tui [-h] [-d] [-c] [-t] [-j] [-nm] [-v] [-ct CUSTOM_TEMP]
TUI interface:
The side bar houses the controls for the displayed grahps.
At the bottom of the side bar, more information is presented in text form.
* Use the arrow keys or 'hjkl' to navigate the side bar
* Toggle between stressed and regular operation using the radio buttons in 'Modes'.
* If you wish to alternate stress defaults, you can do it in 'Stress options'
* Select a different temperature sensors from the 'Temp Sensors' menu
* Change time between updates using the 'Refresh' field
* Use the 'Reset' button to reset graphs and statistics
* Toggle displayed graphs by selecting the [X] check box
* If a sensor is not available on your system, N/A is presented
* If your system supports it, you can use the utf8 button to get a smoother graph
* Press 'q' or the 'Quit' button to quit
* Run `s-tui --help` to get this message and additional cli options
optional arguments:
-h, --help show this help message and exit
-d, --debug Output debug log to _s-tui.log
-c, --csv Save stats to csv file
-t, --terminal Display a single line of stats without tui
-j, --json Display a single line of stats in JSON format
-nm, --no-mouse Disable Mouse for TTY systems
-v, --version Display version
-ct CUSTOM_TEMP, --custom_temp CUSTOM_TEMP
Custom temperature sensors.
The format is: ,
As it appears in 'sensors'
e.g
> sensors
it8792-isa-0a60,
temp1: +47.0C
temp2: +35.0C
temp3: +37.0C
use: -ct it8792,0 for temp 1
-cf CUSTOM_FAN, --custom_fan CUSTOM_FAN
Similar to custom temp
e.g
>sensors
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 1975 RPM
use: -cf thinkpad,0 for fan1
まとめ
s-tuiはターミナルベースのCPUモニタリングツールです。ターミナルさえあれば動作するので例えばリモートサーバーにインストールしておき、ssh経由でサーバーの状態を確認したい場合などに便利に使用できそうです。
