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>


分享到:


相關文章: