04.27 使用S-tui監控Linux CPU性能

使用S-tui監控Linux CPU性能

使用過linux操作系統的小夥伴比較苦惱的是linux命令行界面雖然可以節省大量的機器內存資源,但是我們又不能很直觀的去看機器cpu的性能趨勢和實時的狀態,至少沒有圖形化那麼一目瞭然。

S-tui是一個免費的開源終端用戶界面,用於監控您的電腦。s-tui允許從終端以圖形方式監視CPU溫度,頻率,功率和利用率。它是用Python編寫的,需要root權限才能使用s-tui。

  1. 注意你的CPU溫度/利用率/頻率/功率

  2. 請參閱熱調節引起的性能下降

  3. 不需要使用X服務器。適用於無頭式使用,包括樹莓派

讓我們看看如何在基於Linux的系統上安裝和使用s-tui。

第1步 - 安裝點子

鍵入以下命令以使用apt命令 / apt-get命令安裝pip - Python的軟件包管理:

<code>$ sudo apt install python-pip stress/<code>

第2步 - 安裝s-tui

輸入以下命令來安裝它:

<code>$ sudo pip install s-tui/<code>

Arch Linux用戶可以輸入以下命令來安裝它:

<code>$ sudo yaourt -S s-tui/<code>

第3步 - 使用它

只需輸入以下命令:

<code>$ sudo s-tui/<code>

示例輸出:

使用S-tui監控Linux CPU性能

獲得幫助

s-tui有更多的選擇。鍵入以下命令以查看它們:

<code>$ s-tui --help/<code>

示例輸出:

usage: s-tui [-h] [-d] [-c] [-t] [-j] [-nm] [-v] [-ct CUSTOM_TEMP]
[-cf CUSTOM_FAN]
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: <sensors>,<number>
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/<number>/<sensors>/<quit>/<reset>


分享到:


相關文章: