mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
translated
This commit is contained in:
parent
8e889b95cf
commit
5d2e506e94
@ -1,80 +0,0 @@
|
||||
translating---geekpi
|
||||
|
||||
Hegemon – A Modular System Monitor Application Written In Rust
|
||||
======
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2018/09/hegemon-720x340.png)
|
||||
|
||||
When it comes to monitor running processes in Unix-like systems, the most commonly used applications are **top** and **htop** , which is an enhanced version of top. My personal favorite is htop. However, the developers are releasing few alternatives to these applications every now and then. One such alternative to top and htop utilities is **Hegemon**. It is a modular system monitor application written using **Rust** programming language.
|
||||
|
||||
Concerning about the features of Hegemon, we can list the following:
|
||||
|
||||
* Hegemon will monitor the usage of CPU, memory and Swap.
|
||||
* It monitors the system’s temperature and fan speed.
|
||||
* The update interval time can be adjustable. The default value is 3 seconds.
|
||||
* We can reveal more detailed graph and additional information by expanding the data streams.
|
||||
* Unit tests
|
||||
* Clean interface
|
||||
* Free and open source.
|
||||
|
||||
|
||||
|
||||
### Installing Hegemon
|
||||
|
||||
Make sure you have installed **Rust 1.26** or later version. To install Rust in your Linux distribution, refer the following guide:
|
||||
|
||||
[Install Rust Programming Language In Linux][2]
|
||||
|
||||
Also, install [libsensors][1] library. It is available in the default repositories of most Linux distributions. For example, you can install it in RPM based systems such as Fedora using the following command:
|
||||
|
||||
```
|
||||
$ sudo dnf install lm_sensors-devel
|
||||
```
|
||||
|
||||
On Debian-based systems like Ubuntu, Linux Mint, it can be installed using command:
|
||||
|
||||
```
|
||||
$ sudo apt-get install libsensors4-dev
|
||||
```
|
||||
|
||||
Once you installed Rust and libsensors, install Hegemon using command:
|
||||
|
||||
```
|
||||
$ cargo install hegemon
|
||||
```
|
||||
|
||||
Once hegemon installed, start monitoring the running processes in your Linux system using command:
|
||||
|
||||
```
|
||||
$ hegemon
|
||||
```
|
||||
|
||||
Here is the sample output from my Arch Linux desktop.
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2018/09/Hegemon-in-action.gif)
|
||||
|
||||
To exit, press **Q**.
|
||||
|
||||
|
||||
Please be mindful that hegemon is still in its early development stage and it is not complete replacement for **top** command. There might be bugs and missing features. If you came across any bugs, report them in the project’s github page. The developer is planning to bring more features in the upcoming versions. So, keep an eye on this project.
|
||||
|
||||
And, that’s all for now. Hope this helps. More good stuffs to come. Stay tuned!
|
||||
|
||||
Cheers!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/hegemon-a-modular-system-monitor-application-written-in-rust/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[1]: https://github.com/lm-sensors/lm-sensors
|
||||
[2]: https://www.ostechnix.com/install-rust-programming-language-in-linux/
|
@ -0,0 +1,78 @@
|
||||
Hegemon - 使用 Rust 编写的模块化系统监视程序
|
||||
======
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2018/09/hegemon-720x340.png)
|
||||
|
||||
在类 Unix 系统中监视运行进程时,最常用的程序是 **top** 和 top 的增强版 **htop**。我个人最喜欢的是 htop。但是,开发人员不时会发布这些程序的替代品。top 和 htop 工具的一个替代品是 **Hegemon**。它是使用 **Rust** 语言编写的模块化系统监视程序。
|
||||
|
||||
关于 Hegemon 的功能,我们可以列出以下这些:
|
||||
|
||||
* Hegemon 会监控 CPU、内存和交换页的使用情况。
|
||||
* 它监控系统的温度和风扇速度。
|
||||
* 更新间隔时间可以调整。默认值为 3 秒。
|
||||
* 我们可以通过扩展数据流来展示更详细的图表和其他信息。
|
||||
* 单元测试
|
||||
* 干净的界面
|
||||
* 免费且开源。
|
||||
|
||||
|
||||
|
||||
### 安装 Hegemon
|
||||
|
||||
确保已安装 **Rust 1.26** 或更高版本。要在 Linux 发行版中安装 Rust,请参阅以下指南:
|
||||
|
||||
[Install Rust Programming Language In Linux][2]
|
||||
|
||||
另外要安装 [libsensors][1] 库。它在大多数 Linux 发行版的默认仓库中都有。例如,你可以使用以下命令将其安装在基于 RPM 的系统(如 Fedora)中:
|
||||
|
||||
```
|
||||
$ sudo dnf install lm_sensors-devel
|
||||
```
|
||||
|
||||
在像 Ubuntu、Linux Mint 这样的基于 Debian 的系统上,可以使用这个命令安装它:
|
||||
|
||||
```
|
||||
$ sudo apt-get install libsensors4-dev
|
||||
```
|
||||
|
||||
在安装 Rust 和 libsensors 后,使用命令安装 Hegemon:
|
||||
|
||||
```
|
||||
$ cargo install hegemon
|
||||
```
|
||||
|
||||
安装 hegemon 后,使用以下命令开始监视 Linux 系统中正在运行的进程:
|
||||
|
||||
```
|
||||
$ hegemon
|
||||
```
|
||||
|
||||
以下是 Arch Linux 桌面的示例输出。
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2018/09/Hegemon-in-action.gif)
|
||||
|
||||
要退出,请按 **Q**。
|
||||
|
||||
|
||||
请注意,hegemon 仍处于早期开发阶段,并不能完全取代 **top** 命令。它可能存在 bug 和功能缺失。如果你遇到任何 bug,请在项目的 github 页面中报告它们。开发人员计划在即将推出的版本中引入更多功能。所以,请关注这个项目。
|
||||
|
||||
就是这些了。希望这篇文章有用。还有更多的好东西。敬请关注!
|
||||
|
||||
干杯!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/hegemon-a-modular-system-monitor-application-written-in-rust/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[1]: https://github.com/lm-sensors/lm-sensors
|
||||
[2]: https://www.ostechnix.com/install-rust-programming-language-in-linux/
|
Loading…
Reference in New Issue
Block a user