在Linux上使用htop监视系统进程

Most people familiar with Linux have used the top command line utility to see what process is taking the most CPU or memory. There’s a similar utility called htop that is much easier to use for normal tasks.

大多数熟悉Linux的人都使用top命令行实用程序来查看哪个进程占用了最多的CPU或内存。 有一个类似的实用程序称为htop,它可以更轻松地用于正常任务。

The first great thing about htop is that it will show you your usage per CPU, as well as a meaningful text graph of your memory and swap usage right at the top. I find this much easier to understand at a glance than the default output from top.

关于htop的第一件事是,它将在顶部显示您每个CPU的使用情况,以及有意义的内存和交换使用情况文本图。 我发现这比顶部的默认输出一目了然。

Installing htop on Ubuntu

在Ubuntu上安装htop

Installing on Ubuntu is as simple as apt-get… You can also grab the source from the htop site linked at the bottom of this article.

在Ubuntu上安装就像apt-get一样简单。您也可以从本文底部链接的htop站点获取源代码。

sudo apt-get install htop

sudo apt-get install htop

Once installed, just type htop at a terminal to launch it, and notice the great text-mode graph at the top of the display:

安装完成后,只需在终端上键入htop即可启动它,并注意显示屏顶部的文字模式图:

image

But here’s the best part… just use your Up/Down arrow keys to select a process, and then you can kill it with the F9 key if you’d like, or you can change the priority by using the F7 and F8 keys. (note that you’ll have to be root to give anything really high priority).

但这是最好的部分……只需使用向上/向下箭头键选择一个进程,然后即可根据需要使用F9键取消它,或者可以使用F7和F8键更改优先级。 (请注意,您必须具有超级用户权限才能给予任何真正高优先级的权限)。

image

You can also use the F6 key to change the default sort column really easily:

您还可以使用F6键非常轻松地更改默认的排序列:

image

You can check the setup options for a lot more settings like which columns should show up by default.

您可以检查设置选项以了解更多设置,例如默认情况下应显示哪些列。

htop – process viewer for linux

htop – Linux的进程查看器

翻译自: https://www.howtogeek.com/howto/ubuntu/using-htop-to-monitor-system-processes-on-linux/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值