- 简介
htop是一个Linux下的交互式的进程浏览器,可以用来替换Linux下的top命令。
与top相比,htop有以下优点:
默认支持图形界面的鼠标操作
可以横向或纵向滚动浏览进程列表,以便看到所有的进程和完整的命令行
杀进程时不需要输入进程号
- yum安装
安装epel源
yum install -y epel-release
yum install -y htop
- 源码编译安装
官方地址:https://github.com/htop-dev/htop/releases
wget https://github.com/htop-dev/htop/releases/download/3.1.2/htop-3.1.2.tar.xz
tar -xf htop-3.1.2.tar.xz
cd htop-3.1.2
./configure --prefix =/root/cdh/soft
yum install -y ncurses-devel automake autoconf gcc
make && make install
- 使用
F1 查看htop使用说明
F2 htop 设定布局
F3 搜索进程
F4 增量进程过滤器
F5 显示树形结构
F6 选择排序方式
F7 可减少nice值,这样就可以提高对应进程的优先级
F8 可增加nice值,这样就可以降低对应进程的优先级
F9 可对进程传递信号
F10 结束htop