linux安装bash工具包,Linux 资源监视工具BashTop的安装和使用

使用BashTop,您还可以对进程进行排序,以及轻松地在各种排序选项之间切换。此外,您可以将SIGKILL,SIGTERM和SIGINT发送到所需的进程。

BashTop可以安装在Linux,macOS甚至FreeBSD上。在本文中,您将学习如何在CentOS发行版上安装BashTop。

dac738b7c96c03907404d063ae64f17a.png

它带有游戏风格的响应式终端UI和可自定义的菜单。各种显示部分的整齐排列使监视各种系统指标变得容易。BashTop是Linux中基于终端的资源监控实用程序。它是一个漂亮的命令行工具,可以直观地显示CPU、内存、正在运行的进程和带宽的统计数据。

手动安装

要手动安装BashTop,请如下所示克隆git仓库,并使用以下命令从源代码编译:

$ git clone https://github.com/aristocratos/bashtop.git

$ cd bashtop

$ make install

要卸载BashTop,请运行:

$ make uninstall

BashTop配置

BashTop的配置文件位于 ~/.config/bashtop/bashtop.cfg 位置。您可以根据需要更改参数,以自定义终端上指标的外观和输出。

下面是配置文件内容:

#? Config file for bashtop v. 0.9.25

#* Color theme, looks for a .theme file in "HOME/.config/bashtop/themes" and "HOME/.config/bashtop/themes"and"HOME/.config/bashtop/user_themes"

#* Should be prefixed with either "themes/" or "user_themes/" depending on location, "Default" for builtin default theme

color_theme="Default"

#* Update time in milliseconds, increases automatically if set below internal loops processing time, recommended 2000 ms or above for better sample times for graphs

update_ms="2500"

#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive"

#* "cpu lazy" updates sorting over time, "cpu responsive" updates sorting directly

proc_sorting="cpu lazy"

#* Reverse sorting order, "true" or "false"

proc_reversed="false"

#* Show processes as a tree

proc_tree="false"

#* Check cpu temperature, only works if "sensors", "vcgencmd" or "osx-cpu-temp" commands is available

check_temp="false"

#* Draw a clock at top of screen, formatting according to strftime, empty string to disable

draw_clock="%X"

#* Update main ui when menus are showing, set this to false if the menus is flickering too much for comfort

background_update="true"

#* Custom cpu model name, empty string to disable

custom_cpu_name=""

#* Enable error logging to "$HOME/.config/bashtop/error.log", "true" or "false"

error_logging="true"

#* Show color gradient in process list, "true" or "false"

proc_gradient="true"

#* If process cpu usage should be of the core it's running on or usage of the total available cpu power

proc_per_core="false"

#* Optional filter for shown disks, should be names of mountpoints, "root" replaces "/", separate multiple values with space

disks_filter=""

#* Enable check for new version from github.com/aristocratos/bashtop at start

update_check="true"

#* Enable graphs with double the horizontal resolution, increases cpu usage

hires_graphs="false"

#* Enable the use of psutil python3 module for data collection, default on OSX

use_psutil="false"

若要查看命令和快捷键,请按Esc键,然后使用向下箭头键选择Help选项。

这将打印出下面的菜单和所有命令选项,如图所示。

8ea36e2926cc3692517c66afda65680c.png

总结

BashTop的界面可以说是非常的华丽,用来在同事和老板面前装逼绝对是够用了。不过就是因为界面华丽所以相对于Top和Htop来说慢了不少,毕竟占用资源过多嘛!就笔者自己的体验来说BashTop显示的指标还是很全面的比较适合新手使用,一句话“装逼神器”呀这是!嘿嘿!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值