htop使用

参考:http://hisham.hm/htop/

参考:https://www.cnblogs.com/lazyfang/p/7650010.html

今天听我们的老大说htop,top都可以查看系统CPU,内存,进程的情况。之前也有所耳闻这个htop,却从未亲自尝试过,今天搞一波,纯粹照着别人的教程照猫画虎来一遍:


系统:ubuntu16.04


一、安装htop

这个可以直接安装,centos可能还要考虑安装epel源:

root@ubuntu:~# apt install htop -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  htop
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
Need to get 76.4 kB of archives.
After this operation, 215 kB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu xenial-updates/universe amd64 htop amd64 2.0.1-1ubuntu1 [76.4 kB]
Fetched 76.4 kB in 0s (354 kB/s)
Selecting previously unselected package htop.
(Reading database ... 100269 files and directories currently installed.)
Preparing to unpack .../htop_2.0.1-1ubuntu1_amd64.deb ...
Unpacking htop (2.0.1-1ubuntu1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up htop (2.0.1-1ubuntu1) ...
root@ubuntu:~# which htop
/usr/bin/htop

二、使用htop

界面相当给力,有颜色,CPU,内存,交换分区的使用情况,系统负载,系统 运行时间,进程的状态

竟然还支持鼠标点击

三、F1到F10有不同的功能,或者鼠标直接点上面

3.1  F1  帮助信息

3.2 F2 自定义htop界面还是什么,可以用鼠标操作,很舒服

3.3 F3 搜索进程

3.4 F4 过滤器

3.5 F5树形结构

3.6 F6 选择排序方式

3.7 F7和F8是改变进程的nice值,从而改变进程的优先值

3.8 kill 杀进程

3.9 按下u,选择某个用户回车,只看某用户的进程

猜你喜欢

转载自blog.csdn.net/qq_33317586/article/details/84963656