文档详情

linux下取代进程管理工具htop.pdf

发布:2025-02-10约4.69千字共2页下载文档
文本预览下载声明

Linux下取代top的进程管理工具htop

运营博客

一、htop简介Thisishtop,aninteractiveprocessviewerforLinux.Itisatext-modeapplication

(forconsoleorXterminals)andrequiresncurses.ComparisonbetweenhtopandtopIn‘htop’you

canscrollthelistverticallyandhorizontallytoseeallprocessesandcompletecommandlines.In

‘top’youaresubjecttoadelayforeachunassignedkeyyoupress(especiallyannoyingwhenmulti-

keyescapesequencesaretriggeredbyaccident).’htop’startsfaster(‘top’seemstocollectdatafora

whilebeforedisplayinganything).In‘htop’youdon’tneedtotypetheprocessnumbertokilla

process,in‘top’youdo.In‘htop’youdon’tneedtotypetheprocessnumberorthepriorityvalueto

reniceaprocess,in‘top’youdo.’htop’supportsmouseoperation,‘top’doesn’t’top’isolder,hence,

moreusedandtested.htop是Linux系统中的一个互动的进程查看器,一个文本模式的应用程

序(在控制台或者X终端中),需要ncurses。与Linux传统的top相比,htop更加人性化。它

可让用户交互式操作,支持颜色,可横向或纵向滚动浏览进程列表,并支持鼠标操作。

与top相比,htop有以下优点:可以横向或纵向滚动浏览进程列表,以便看到所有的进程和

完整令行。在启动上,比top更快。杀进程时不需要输入进程号。htop支持鼠标操作。

top已经很老了。htop官网二、htop安装a.源码包安装##tarzxvf

htop-1.0.2.tar.gz#cdhtop-1.0.2#./configure#make;;makeinstall若出现错误:

configure:error:Youmaywanttouse--disable-unicodeorinstalllibncursesw.则需安装ncurses-

devel#yuminstallncurses-develb.RHEL/CentOS安装可以通过yuminstallhtop来安装它,

但前提是要添加epel的yum源,具体请参考?CentOSyum源的配置与使用。#rpm-

ivh?rpm--import

/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL???????//导入key#yuminstallhtop三、htop参数键入

htop命令,打开htop。#htop上面左上角显示CPU、内存、交换区的使用情况,右边显示

任务、负载、开机时间,下面就是进程实时状况。下面是F1~F10的功能和对应的字母快捷

键。ShortcutKeyFunctionKeyDescription中文说明h,?F1InvokehtopHelp查看

显示全部
相似文档