架构师成长之路1.1-系统监控工具htop
架构师成长之路1.1-系统监控工具htop
htop 是Linux系统中的一个互动的进程查看器,一个文本模式的应用程序(在控制台或者X终端中),需要ncurses。
与Linux传统的top相比,htop更加人性化。它可让用户交互式操作,支持颜色主题,可横向或纵向滚动浏览进程列表,并支持鼠标操作。
与top相比,htop有以下优点:
- 可以横向或纵向滚动浏览进程列表,以便看到所有的进程和完整的命令行。
- 在启动上,比top 更快。
- 杀进程时不需要输入进程号。
- htop 支持鼠标操作。
- 支持进程树状显示、按名称查找进程
(显示进程打开的文件<打开htop后选择某一个进程,按s键即可用strace追踪进程的系统调用>,及显示进程内存映射情况。)
1. htop获取与安装
Htop的安装,既可以通过源码包编译安装,也可以配置好yum源后网络下载安装。
本文介绍源码安装
- 步骤1、在htop的项目官方网站上:http://sourceforge.net/projects/htop/直接下载即可
已经将文件下载在linux系统上面,然后解包。
- 步骤2、要解包一个软件的tarball,使用标准的tar命令。
- 步骤3、cd进入目录后,检查系统拥有合适的编译器能够编译源代码,make构建各种二进制文件
tar -zxvf htop-1.0.2.tar.gz
[root@CactiEZ /]# tar -zxvf htop-1.0.2.tar.gz
htop-1.0.2/
htop-1.0.2/config.sub
htop-1.0.2/htop.1.in
htop-1.0.2/AvailableMetersPanel.h
htop-1.0.2/Settings.h
htop-1.0.2/CategoriesPanel.c
htop-1.0.2/OpenFilesScreen.c
htop-1.0.2/UptimeMeter.c
htop-1.0.2/MetersPanel.c
htop-1.0.2/install-sh
htop-1.0.2/README
htop-1.0.2/AvailableColumnsPanel.c
htop-1.0.2/MemoryMeter.c
htop-1.0.2/SignalsPanel.c
htop-1.0.2/SwapMeter.h
htop-1.0.2/FunctionBar.c
htop-1.0.2/AvailableMetersPanel.c
htop-1.0.2/TasksMeter.c
htop-1.0.2/CategoriesPanel.h
htop-1.0.2/htop.c
htop-1.0.2/Vector.h
htop-1.0.2/Makefile.am
htop-1.0.2/autogen.sh
htop-1.0.2/BatteryMeter.h
htop-1.0.2/Affinity.h
htop-1.0.2/aclocal.m4
htop-1.0.2/LoadAverageMeter.h
htop-1.0.2/CheckItem.h
htop-1.0.2/htop.png
htop-1.0.2/configure
htop-1.0.2/FunctionBar.h
htop-1.0.2/depcomp
htop-1.0.2/Header.h
htop-1.0.2/IOPriority.c
htop-1.0.2/ColumnsPanel.h
htop-1.0.2/ColumnsPanel.c
htop-1.0.2/m4/
htop-1.0.2/m4/lt~obsolete.m4
htop-1.0.2/m4/ltoptions.m4
htop-1.0.2/m4/ltsugar.m4
htop-1.0.2/m4/ltversion.m4
htop-1.0.2/m4/libtool.m4
htop-1.0.2/UptimeMeter.h
htop-1.0.2/ListItem.h
htop-1.0.2/SignalsPanel.h
htop-1.0.2/IOPriorityPanel.h
htop-1.0.2/Settings.c
htop-1.0.2/htop.1
htop-1.0.2/configure.ac
htop-1.0.2/Meter.h
htop-1.0.2/MemoryMeter.h
htop-1.0.2/Header.c
htop-1.0.2/IOPriorityPanel.c
htop-1.0.2/CPUMeter.c
htop-1.0.2/ChangeLog
htop-1.0.2/UsersTable.c
htop-1.0.2/ltmain.sh
htop-1.0.2/HostnameMeter.h
htop-1.0.2/Affinity.c
htop-1.0.2/Hashtable.c
htop-1.0.2/BatteryMeter.c
htop-1.0.2/config.h
htop-1.0.2/Meter.c
htop-1.0.2/htop.desktop
htop-1.0.2/config.h.in
htop-1.0.2/RichString.c
htop-1.0.2/OpenFilesScreen.h
htop-1.0.2/String.h
htop-1.0.2/ClockMeter.c
htop-1.0.2/Process.h
htop-1.0.2/RichString.h
htop-1.0.2/ClockMeter.h
htop-1.0.2/AffinityPanel.h
htop-1.0.2/CRT.h
htop-1.0.2/ListItem.c
htop-1.0.2/SwapMeter.c
htop-1.0.2/CPUMeter.h
htop-1.0.2/Panel.c
htop-1.0.2/Panel.h
htop-1.0.2/ProcessList.h
htop-1.0.2/Object.h
htop-1.0.2/LoadAverageMeter.c
htop-1.0.2/AffinityPanel.c
htop-1.0.2/Process.c
htop-1.0.2/ScreenManager.h
htop-1.0.2/MetersPanel.h
htop-1.0.2/String.c
htop-1.0.2/INSTALL
htop-1.0.2/UsersTable.h
htop-1.0.2/TasksMeter.h
htop-1.0.2/NEWS
htop-1.0.2/CRT.c
htop-1.0.2/htop.h
htop-1.0.2/TraceScreen.h
htop-1.0.2/AUTHORS
htop-1.0.2/ScreenManager.c
htop-1.0.2/ColorsPanel.c
htop-1.0.2/TraceScreen.c
htop-1.0.2/DisplayOptionsPanel.h
htop-1.0.2/ProcessList.c
htop-1.0.2/CheckItem.c
htop-1.0.2/IOPriority.h
htop-1.0.2/AvailableColumnsPanel.h
htop-1.0.2/compile
htop-1.0.2/HostnameMeter.c
htop-1.0.2/Makefile.in
htop-1.0.2/Object.c
htop-1.0.2/ColorsPanel.h
htop-1.0.2/Vector.c
htop-1.0.2/DisplayOptionsPanel.c
htop-1.0.2/scripts/
htop-1.0.2/scripts/MakeHeader.py
htop-1.0.2/missing
htop-1.0.2/COPYING
htop-1.0.2/Hashtable.h
htop-1.0.2/config.guess
[root@CactiEZ /]#
tar -zxvf htop-1.0.2.tar.gz
提示没有安装GNC C编辑器。以下安装GNC C编辑器 。
yum -y install gcc
[root@CactiEZ /]# yum -y install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i686 :4.4.-.el6 set to be updated
--> Processing Dependency: libgomp = 4.4.-.el6 for package: gcc-4.4.-.el6.i686
--> Processing Dependency: cpp = 4.4.-.el6 for package: gcc-4.4.-.el6.i686
--> Processing Dependency: libgcc >= 4.4.-.el6 for package: gcc-4.4.-.el6.i686
--> Processing Dependency: glibc-devel >= 2.2.- for package: gcc-4.4.-.el6.i686
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.-.el6.i686
--> Processing Dependency: libgomp.so. for package: gcc-4.4.-.el6.i686
--> Running transaction check
---> Package cloog-ppl.i686 :0.15.-1.2.el6 set to be updated
--> Processing Dependency: libppl_c.so. for package: cloog-ppl-0.15.-1.2.el6.i686
--> Processing Dependency: libppl.so. for package: cloog-ppl-0.15.-1.2.el6.i686
---> Package cpp.i686 :4.4.-.el6 set to be updated
--> Processing Dependency: libmpfr.so. for package: cpp-4.4.-.el6.i686
---> Package glibc-devel.i686 :2.12-1.212.el6 set to be updated
--> Processing Dependency: glibc-headers = 2.12-1.212.el6 for package: glibc-devel-2.12-1.212.el6.i686
--> Processing Dependency: glibc = 2.12-1.212.el6 for package: glibc-devel-2.12-1.212.el6.i686
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.212.el6.i686
---> Package libgcc.i686 :4.4.-.el6 set to be updated
---> Package libgomp.i686 :4.4.-.el6 set to be updated
--> Running transaction check
--> Processing Dependency: glibc = 2.12-1.7.el6 for package: glibc-common-2.12-1.7.el6.i686
---> Package glibc.i686 :2.12-1.212.el6 set to be updated
---> Package glibc-headers.i686 :2.12-1.212.el6 set to be updated
--> Processing Dependency: kernel-headers >= 2.2. for package: glibc-headers-2.12-1.212.el6.i686
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.212.el6.i686
---> Package mpfr.i686 :2.4.-.el6 set to be updated
---> Package ppl.i686 :0.10.-.el6 set to be updated
--> Running transaction check
---> Package glibc-common.i686 :2.12-1.212.el6 set to be updated
--> Processing Dependency: tzdata >= 2015g- for package: glibc-common-2.12-1.212.el6.i686
---> Package kernel-headers.i686 :2.6.-754.3..el6 set to be updated
--> Running transaction check
---> Package tzdata.noarch :2018e-.el6 set to be updated
--> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
gcc i686 4.4.-.el6 base 8.2 M
Installing for dependencies:
cloog-ppl i686 0.15.-1.2.el6 base k
cpp i686 4.4.-.el6 base 3.4 M
glibc-devel i686 2.12-1.212.el6 base k
glibc-headers i686 2.12-1.212.el6 base k
kernel-headers i686 2.6.-754.3..el6 updates 4.5 M
libgomp i686 4.4.-.el6 base k
mpfr i686 2.4.-.el6 base k
ppl i686 0.10.-.el6 base 1.3 M
Updating for dependencies:
glibc i686 2.12-1.212.el6 base 4.4 M
glibc-common i686 2.12-1.212.el6 base M
libgcc i686 4.4.-.el6 base k
tzdata noarch 2018e-.el6 base k Transaction Summary
========================================================================================================================================
Install Package(s)
Upgrade Package(s) Total download size: M
Downloading Packages:
(/): cloog-ppl-0.15.-1.2.el6.i686.rpm | kB :
(/): cpp-4.4.-.el6.i686.rpm | 3.4 MB :
(/): gcc-4.4.-.el6.i686.rpm | 8.2 MB :
(/): glibc-2.12-1.212.el6.i686.rpm | 4.4 MB :
(/): glibc-common-2.12-1.212.el6.i686.rpm | MB :
(/): glibc-devel-2.12-1.212.el6.i686.rpm | kB :
(/): glibc-headers-2.12-1.212.el6.i686.rpm | kB :
(/): kernel-headers-2.6.-754.3..el6.i686.rpm | 4.5 MB :
(/): libgcc-4.4.-.el6.i686.rpm | kB :
(/): libgomp-4.4.-.el6.i686.rpm | kB :
(/): mpfr-2.4.-.el6.i686.rpm | kB :
(/): ppl-0.10.-.el6.i686.rpm | 1.3 MB :
(/): tzdata-2018e-.el6.noarch.rpm | kB :
----------------------------------------------------------------------------------------------------------------------------------------
Total kB/s | MB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libgcc-4.4.-.el6.i686 /
Updating : tzdata-2018e-.el6.noarch /
Installing : kernel-headers-2.6.-754.3..el6.i686 /
Updating : glibc-common-2.12-1.212.el6.i686 /
Updating : glibc-2.12-1.212.el6.i686 /
Installing : glibc-headers-2.12-1.212.el6.i686 /
Installing : libgomp-4.4.-.el6.i686 /
Installing : mpfr-2.4.-.el6.i686 /
Installing : cpp-4.4.-.el6.i686 /
Installing : ppl-0.10.-.el6.i686 /
Installing : glibc-devel-2.12-1.212.el6.i686 /
Installing : cloog-ppl-0.15.-1.2.el6.i686 /
Installing : gcc-4.4.-.el6.i686 /
Cleanup : glibc-common-2.12-1.7.el6.i686 /
Cleanup : glibc-2.12-1.7.el6.i686 /
Cleanup : tzdata-2010l-.el6.noarch /
Cleanup : libgcc-4.4.-.el6.i686 / Installed:
gcc.i686 :4.4.-.el6 Dependency Installed:
cloog-ppl.i686 :0.15.-1.2.el6 cpp.i686 :4.4.-.el6 glibc-devel.i686 :2.12-1.212.el6
glibc-headers.i686 :2.12-1.212.el6 kernel-headers.i686 :2.6.-754.3..el6 libgomp.i686 :4.4.-.el6
mpfr.i686 :2.4.-.el6 ppl.i686 :0.10.-.el6 Dependency Updated:
glibc.i686 :2.12-1.212.el6 glibc-common.i686 :2.12-1.212.el6 libgcc.i686 :4.4.-.el6 tzdata.noarch :2018e-.el6 Complete!
You have new mail in /var/spool/mail/root
[root@CactiEZ /]# ^C
yum -y install gcc
再次使用 ./configure 确保系统拥有合适的编译器能够编译源代码。及具备正确的库依赖关系。
[root@CactiEZ htop-1.0.]# ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc and cc understand -c and -o together... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments...
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for ceil in -lm... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking curses.h usability... no
checking curses.h presence... no
checking for curses.h... no
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for uid_t in sys/types.h... yes
checking whether closedir returns void... no
checking return type of signal handlers... void
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for memmove... yes
checking for strncasecmp... yes
checking for strstr... yes
checking for strdup... yes
checking whether gcc -std=c99 option works... yes
checking for refresh in -lncursesw... no
configure: error: You may want to use --disable-unicode or install libncursesw.
./configure
最后一段出现错误:
configure: error: You may want to use --disable-unicode or install libncursesw.
需要安装 ncurses-devel
yum install ncurses-devel
[root@CactiEZ htop-1.0.2]# yum install ncurses-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ncurses-devel.i686 0:5.7-4.20090207.el6 set to be updated
--> Processing Dependency: ncurses-libs = 5.7-4.20090207.el6 for package: ncurses-devel-5.7-4.20090207.el6.i686
--> Processing Dependency: pkgconfig for package: ncurses-devel-5.7-4.20090207.el6.i686
--> Processing Dependency: /usr/bin/pkg-config for package: ncurses-devel-5.7-4.20090207.el6.i686
--> Running transaction check
---> Package ncurses-libs.i686 0:5.7-4.20090207.el6 set to be updated
--> Processing Dependency: ncurses-base = 5.7-4.20090207.el6 for package: ncurses-libs-5.7-4.20090207.el6.i686
---> Package pkgconfig.i686 1:0.23-9.1.el6 set to be updated
--> Running transaction check
---> Package ncurses-base.i686 0:5.7-4.20090207.el6 set to be updated
--> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
ncurses-devel i686 5.7-4.20090207.el6 base 641 k
Installing for dependencies:
pkgconfig i686 1:0.23-9.1.el6 base 67 k
Updating for dependencies:
ncurses-base i686 5.7-4.20090207.el6 base 61 k
ncurses-libs i686 5.7-4.20090207.el6 base 249 k Transaction Summary
========================================================================================================================================
Install 2 Package(s)
Upgrade 2 Package(s) Total download size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): ncurses-base-5.7-4.20090207.el6.i686.rpm | 61 kB 00:00
(2/4): ncurses-devel-5.7-4.20090207.el6.i686.rpm | 641 kB 00:01
(3/4): ncurses-libs-5.7-4.20090207.el6.i686.rpm | 249 kB 00:00
(4/4): pkgconfig-0.23-9.1.el6.i686.rpm | 67 kB 00:00
----------------------------------------------------------------------------------------------------------------------------------------
Total 320 kB/s | 1.0 MB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : ncurses-base-5.7-4.20090207.el6.i686 1/6
Updating : ncurses-libs-5.7-4.20090207.el6.i686 2/6
Installing : 1:pkgconfig-0.23-9.1.el6.i686 3/6
Installing : ncurses-devel-5.7-4.20090207.el6.i686 4/6
Cleanup : ncurses-libs-5.7-3.20090208.el6.i686 5/6
Cleanup : ncurses-base-5.7-3.20090208.el6.i686 6/6 Installed:
ncurses-devel.i686 0:5.7-4.20090207.el6 Dependency Installed:
pkgconfig.i686 1:0.23-9.1.el6 Dependency Updated:
ncurses-base.i686 0:5.7-4.20090207.el6 ncurses-libs.i686 0:5.7-4.20090207.el6 Complete!
[root@CactiEZ htop-1.0.2]#
yum install ncurses-devel
重新执行./configure
然后,make构建各种二进制文件
[root@CactiEZ htop-1.0.]# make
make all-am
make[]: Entering directory `/htop-1.0.'
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-AvailableMetersPanel.o -MD -MP -MF .deps/htop-AvailableMetersPanel.Tpo -c -o htop-AvailableMetersPanel.o `test -f 'AvailableMetersPanel.c' || echo './'`AvailableMetersPanel.c
mv -f .deps/htop-AvailableMetersPanel.Tpo .deps/htop-AvailableMetersPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-CategoriesPanel.o -MD -MP -MF .deps/htop-CategoriesPanel.Tpo -c -o htop-CategoriesPanel.o `test -f 'CategoriesPanel.c' || echo './'`CategoriesPanel.c
mv -f .deps/htop-CategoriesPanel.Tpo .deps/htop-CategoriesPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-CheckItem.o -MD -MP -MF .deps/htop-CheckItem.Tpo -c -o htop-CheckItem.o `test -f 'CheckItem.c' || echo './'`CheckItem.c
mv -f .deps/htop-CheckItem.Tpo .deps/htop-CheckItem.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-ClockMeter.o -MD -MP -MF .deps/htop-ClockMeter.Tpo -c -o htop-ClockMeter.o `test -f 'ClockMeter.c' || echo './'`ClockMeter.c
mv -f .deps/htop-ClockMeter.Tpo .deps/htop-ClockMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-ColorsPanel.o -MD -MP -MF .deps/htop-ColorsPanel.Tpo -c -o htop-ColorsPanel.o `test -f 'ColorsPanel.c' || echo './'`ColorsPanel.c
mv -f .deps/htop-ColorsPanel.Tpo .deps/htop-ColorsPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-ColumnsPanel.o -MD -MP -MF .deps/htop-ColumnsPanel.Tpo -c -o htop-ColumnsPanel.o `test -f 'ColumnsPanel.c' || echo './'`ColumnsPanel.c
mv -f .deps/htop-ColumnsPanel.Tpo .deps/htop-ColumnsPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-CPUMeter.o -MD -MP -MF .deps/htop-CPUMeter.Tpo -c -o htop-CPUMeter.o `test -f 'CPUMeter.c' || echo './'`CPUMeter.c
mv -f .deps/htop-CPUMeter.Tpo .deps/htop-CPUMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-CRT.o -MD -MP -MF .deps/htop-CRT.Tpo -c -o htop-CRT.o `test -f 'CRT.c' || echo './'`CRT.c
mv -f .deps/htop-CRT.Tpo .deps/htop-CRT.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-DisplayOptionsPanel.o -MD -MP -MF .deps/htop-DisplayOptionsPanel.Tpo -c -o htop-DisplayOptionsPanel.o `test -f 'DisplayOptionsPanel.c' || echo './'`DisplayOptionsPanel.c
mv -f .deps/htop-DisplayOptionsPanel.Tpo .deps/htop-DisplayOptionsPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-FunctionBar.o -MD -MP -MF .deps/htop-FunctionBar.Tpo -c -o htop-FunctionBar.o `test -f 'FunctionBar.c' || echo './'`FunctionBar.c
mv -f .deps/htop-FunctionBar.Tpo .deps/htop-FunctionBar.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Hashtable.o -MD -MP -MF .deps/htop-Hashtable.Tpo -c -o htop-Hashtable.o `test -f 'Hashtable.c' || echo './'`Hashtable.c
mv -f .deps/htop-Hashtable.Tpo .deps/htop-Hashtable.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Header.o -MD -MP -MF .deps/htop-Header.Tpo -c -o htop-Header.o `test -f 'Header.c' || echo './'`Header.c
mv -f .deps/htop-Header.Tpo .deps/htop-Header.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-htop.o -MD -MP -MF .deps/htop-htop.Tpo -c -o htop-htop.o `test -f 'htop.c' || echo './'`htop.c
mv -f .deps/htop-htop.Tpo .deps/htop-htop.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-ListItem.o -MD -MP -MF .deps/htop-ListItem.Tpo -c -o htop-ListItem.o `test -f 'ListItem.c' || echo './'`ListItem.c
mv -f .deps/htop-ListItem.Tpo .deps/htop-ListItem.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-LoadAverageMeter.o -MD -MP -MF .deps/htop-LoadAverageMeter.Tpo -c -o htop-LoadAverageMeter.o `test -f 'LoadAverageMeter.c' || echo './'`LoadAverageMeter.c
mv -f .deps/htop-LoadAverageMeter.Tpo .deps/htop-LoadAverageMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-MemoryMeter.o -MD -MP -MF .deps/htop-MemoryMeter.Tpo -c -o htop-MemoryMeter.o `test -f 'MemoryMeter.c' || echo './'`MemoryMeter.c
mv -f .deps/htop-MemoryMeter.Tpo .deps/htop-MemoryMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Meter.o -MD -MP -MF .deps/htop-Meter.Tpo -c -o htop-Meter.o `test -f 'Meter.c' || echo './'`Meter.c
mv -f .deps/htop-Meter.Tpo .deps/htop-Meter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-MetersPanel.o -MD -MP -MF .deps/htop-MetersPanel.Tpo -c -o htop-MetersPanel.o `test -f 'MetersPanel.c' || echo './'`MetersPanel.c
mv -f .deps/htop-MetersPanel.Tpo .deps/htop-MetersPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Object.o -MD -MP -MF .deps/htop-Object.Tpo -c -o htop-Object.o `test -f 'Object.c' || echo './'`Object.c
mv -f .deps/htop-Object.Tpo .deps/htop-Object.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Panel.o -MD -MP -MF .deps/htop-Panel.Tpo -c -o htop-Panel.o `test -f 'Panel.c' || echo './'`Panel.c
mv -f .deps/htop-Panel.Tpo .deps/htop-Panel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-BatteryMeter.o -MD -MP -MF .deps/htop-BatteryMeter.Tpo -c -o htop-BatteryMeter.o `test -f 'BatteryMeter.c' || echo './'`BatteryMeter.c
mv -f .deps/htop-BatteryMeter.Tpo .deps/htop-BatteryMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Process.o -MD -MP -MF .deps/htop-Process.Tpo -c -o htop-Process.o `test -f 'Process.c' || echo './'`Process.c
mv -f .deps/htop-Process.Tpo .deps/htop-Process.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-ProcessList.o -MD -MP -MF .deps/htop-ProcessList.Tpo -c -o htop-ProcessList.o `test -f 'ProcessList.c' || echo './'`ProcessList.c
mv -f .deps/htop-ProcessList.Tpo .deps/htop-ProcessList.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-RichString.o -MD -MP -MF .deps/htop-RichString.Tpo -c -o htop-RichString.o `test -f 'RichString.c' || echo './'`RichString.c
mv -f .deps/htop-RichString.Tpo .deps/htop-RichString.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-ScreenManager.o -MD -MP -MF .deps/htop-ScreenManager.Tpo -c -o htop-ScreenManager.o `test -f 'ScreenManager.c' || echo './'`ScreenManager.c
mv -f .deps/htop-ScreenManager.Tpo .deps/htop-ScreenManager.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Settings.o -MD -MP -MF .deps/htop-Settings.Tpo -c -o htop-Settings.o `test -f 'Settings.c' || echo './'`Settings.c
mv -f .deps/htop-Settings.Tpo .deps/htop-Settings.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-IOPriorityPanel.o -MD -MP -MF .deps/htop-IOPriorityPanel.Tpo -c -o htop-IOPriorityPanel.o `test -f 'IOPriorityPanel.c' || echo './'`IOPriorityPanel.c
mv -f .deps/htop-IOPriorityPanel.Tpo .deps/htop-IOPriorityPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-SignalsPanel.o -MD -MP -MF .deps/htop-SignalsPanel.Tpo -c -o htop-SignalsPanel.o `test -f 'SignalsPanel.c' || echo './'`SignalsPanel.c
mv -f .deps/htop-SignalsPanel.Tpo .deps/htop-SignalsPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-String.o -MD -MP -MF .deps/htop-String.Tpo -c -o htop-String.o `test -f 'String.c' || echo './'`String.c
mv -f .deps/htop-String.Tpo .deps/htop-String.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-SwapMeter.o -MD -MP -MF .deps/htop-SwapMeter.Tpo -c -o htop-SwapMeter.o `test -f 'SwapMeter.c' || echo './'`SwapMeter.c
mv -f .deps/htop-SwapMeter.Tpo .deps/htop-SwapMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-TasksMeter.o -MD -MP -MF .deps/htop-TasksMeter.Tpo -c -o htop-TasksMeter.o `test -f 'TasksMeter.c' || echo './'`TasksMeter.c
mv -f .deps/htop-TasksMeter.Tpo .deps/htop-TasksMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-TraceScreen.o -MD -MP -MF .deps/htop-TraceScreen.Tpo -c -o htop-TraceScreen.o `test -f 'TraceScreen.c' || echo './'`TraceScreen.c
mv -f .deps/htop-TraceScreen.Tpo .deps/htop-TraceScreen.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-UptimeMeter.o -MD -MP -MF .deps/htop-UptimeMeter.Tpo -c -o htop-UptimeMeter.o `test -f 'UptimeMeter.c' || echo './'`UptimeMeter.c
mv -f .deps/htop-UptimeMeter.Tpo .deps/htop-UptimeMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-UsersTable.o -MD -MP -MF .deps/htop-UsersTable.Tpo -c -o htop-UsersTable.o `test -f 'UsersTable.c' || echo './'`UsersTable.c
mv -f .deps/htop-UsersTable.Tpo .deps/htop-UsersTable.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Vector.o -MD -MP -MF .deps/htop-Vector.Tpo -c -o htop-Vector.o `test -f 'Vector.c' || echo './'`Vector.c
mv -f .deps/htop-Vector.Tpo .deps/htop-Vector.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-AvailableColumnsPanel.o -MD -MP -MF .deps/htop-AvailableColumnsPanel.Tpo -c -o htop-AvailableColumnsPanel.o `test -f 'AvailableColumnsPanel.c' || echo './'`AvailableColumnsPanel.c
mv -f .deps/htop-AvailableColumnsPanel.Tpo .deps/htop-AvailableColumnsPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-AffinityPanel.o -MD -MP -MF .deps/htop-AffinityPanel.Tpo -c -o htop-AffinityPanel.o `test -f 'AffinityPanel.c' || echo './'`AffinityPanel.c
mv -f .deps/htop-AffinityPanel.Tpo .deps/htop-AffinityPanel.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-HostnameMeter.o -MD -MP -MF .deps/htop-HostnameMeter.Tpo -c -o htop-HostnameMeter.o `test -f 'HostnameMeter.c' || echo './'`HostnameMeter.c
mv -f .deps/htop-HostnameMeter.Tpo .deps/htop-HostnameMeter.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-OpenFilesScreen.o -MD -MP -MF .deps/htop-OpenFilesScreen.Tpo -c -o htop-OpenFilesScreen.o `test -f 'OpenFilesScreen.c' || echo './'`OpenFilesScreen.c
mv -f .deps/htop-OpenFilesScreen.Tpo .deps/htop-OpenFilesScreen.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-Affinity.o -MD -MP -MF .deps/htop-Affinity.Tpo -c -o htop-Affinity.o `test -f 'Affinity.c' || echo './'`Affinity.c
mv -f .deps/htop-Affinity.Tpo .deps/htop-Affinity.Po
gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-IOPriority.o -MD -MP -MF .deps/htop-IOPriority.Tpo -c -o htop-IOPriority.o `test -f 'IOPriority.c' || echo './'`IOPriority.c
mv -f .deps/htop-IOPriority.Tpo .deps/htop-IOPriority.Po
/bin/sh ./libtool --tag=CC --mode=link gcc -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -o htop htop-AvailableMetersPanel.o htop-CategoriesPanel.o htop-CheckItem.o htop-ClockMeter.o htop-ColorsPanel.o htop-ColumnsPanel.o htop-CPUMeter.o htop-CRT.o htop-DisplayOptionsPanel.o htop-FunctionBar.o htop-Hashtable.o htop-Header.o htop-htop.o htop-ListItem.o htop-LoadAverageMeter.o htop-MemoryMeter.o htop-Meter.o htop-MetersPanel.o htop-Object.o htop-Panel.o htop-BatteryMeter.o htop-Process.o htop-ProcessList.o htop-RichString.o htop-ScreenManager.o htop-Settings.o htop-IOPriorityPanel.o htop-SignalsPanel.o htop-String.o htop-SwapMeter.o htop-TasksMeter.o htop-TraceScreen.o htop-UptimeMeter.o htop-UsersTable.o htop-Vector.o htop-AvailableColumnsPanel.o htop-AffinityPanel.o htop-HostnameMeter.o htop-OpenFilesScreen.o htop-Affinity.o htop-IOPriority.o -lncursesw -lm
libtool: link: gcc -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -o htop htop-AvailableMetersPanel.o htop-CategoriesPanel.o htop-CheckItem.o htop-ClockMeter.o htop-ColorsPanel.o htop-ColumnsPanel.o htop-CPUMeter.o htop-CRT.o htop-DisplayOptionsPanel.o htop-FunctionBar.o htop-Hashtable.o htop-Header.o htop-htop.o htop-ListItem.o htop-LoadAverageMeter.o htop-MemoryMeter.o htop-Meter.o htop-MetersPanel.o htop-Object.o htop-Panel.o htop-BatteryMeter.o htop-Process.o htop-ProcessList.o htop-RichString.o htop-ScreenManager.o htop-Settings.o htop-IOPriorityPanel.o htop-SignalsPanel.o htop-String.o htop-SwapMeter.o htop-TasksMeter.o htop-TraceScreen.o htop-UptimeMeter.o htop-UsersTable.o htop-Vector.o htop-AvailableColumnsPanel.o htop-AffinityPanel.o htop-HostnameMeter.o htop-OpenFilesScreen.o htop-Affinity.o htop-IOPriority.o -lncursesw -lm
make[]: Leaving directory `/htop-1.0.'
[root@CactiEZ htop-1.0.]#
make
安装完成。
2.htop参数
键入htop 命令,打开htop。
左边部分从上至下,分别为,cpu、内存、交换分区的使用情况,右边部分为:Tasks为进程总数,当前运行的进程数、Load average为系统1分钟,5分钟,10分钟的平均负载情况、Uptime为系统运行的时间。
,就是进程实时状况。
- PID:进行的标识号
- USER:运行此进程的用户
- PRI:进程的优先级
- NI:进程的优先级别值,默认的为0,可以进行调整
- VIRT:进程占用的虚拟内存值
- RES:进程占用的物理内存值
- SHR:进程占用的共享内存值
- S:进程的运行状况,R表示正在运行、S表示休眠,等待唤醒、Z表示僵死状态
- %CPU:该进程占用的CPU使用率
- %MEM:该进程占用的物理内存和总内存的百分比
- TIME+:该进程启动后占用的总的CPU时间
- COMMAND:进程启动的启动命令名称
下面是 F1~F10 的功能和对应的字母快捷键。
Shortcut Key | Function Key | Description | 中文说明 |
h, ? | F1 | Invoke htop Help | 查看htop使用说明 |
S | F2 | Htop Setup Menu | htop 设定 |
/ | F3 | Search for a Process | 搜索进程 |
\ | F4 | Incremental process filtering | 增量进程过滤器 |
t | F5 | Tree View | 显示树形结构 |
<, > | F6 | Sort by a column | 选择排序方式 |
[ | F7 | Nice - (change priority) | 可减少nice值,这样就可以提高对应进程的优先级 |
] | F8 | Nice + (change priority) | 可增加nice值,这样就可以降低对应进程的优先级 |
k | F9 | Kill a Process | 可对进程传递信号 |
q | F10 | Quit htop | 结束htop |
以下命令行选项(COMMAND-LINE OPTIONS)
- -C --no-color 使用一个单色的配色方案
- -d --delay=DELAY 设置延迟更新时间,单位秒
- -h --help 显示htop 命令帮助信息
- -u --user=USERNAME 只显示一个给定的用户的过程
- -p --pid=PID,PID… 只显示给定的PIDs
- -s --sort-key COLUMN 依此列来排序
- -v –version 显示版本信息
以下交互式命令(INTERACTIVE COMMANDS)
- 上下键或PgUP, PgDn 选定想要的进程,左右键或Home, End 移动字段,当然也可以直接用鼠标选定进程;
- Space 标记/取消标记一个进程。命令可以作用于多个进程,例如 "kill",将应用于所有已标记的进程
- U 取消标记所有进程
- s 选择某一进程,按s:用strace追踪进程的系统调用
- l 显示进程打开的文件: 如果安装了lsof,按此键可以显示进程所打开的文件
- I 倒转排序顺序,如果排序是正序的,则反转成倒序的,反之亦然
- +, - When in tree view mode, expand or collapse subtree. When a subtree is collapsed a "+" sign shows to the left of the process name.
- a (在有多处理器的机器上) 设置 CPU affinity: 标记一个进程允许使用哪些CPU
- u 显示特定用户进程
- M 按Memory 使用排序
- P 按CPU 使用排序
- T 按Time+ 使用排序
- F 跟踪进程: 如果排序顺序引起选定的进程在列表上到处移动,让选定条跟随该进程。这对监视一个进程非常有用:通过这种方式,你可以让一个进程在屏幕上一直可见。使用方向键会停止该功能。
- K 显示/隐藏内核线程
- H 显示/隐藏用户线程
- Ctrl-L 刷新
- Numbers PID 查找: 输入PID,光标将移动到相应的进程上
3.htop使用
3.1. 显示自带帮助
鼠标点击Help或者按F1 显示自带帮助
3.2. htop 设定
鼠标点击Setup或者按下F2 之后进入htop 设定的页面,Meters 页面设定了顶端的一些信息显示,顶端的显示又分为左右两侧,到底能显示些什么可以在最右侧那栏新增,要新增到上方左侧(F5)或是右侧(F6)都可以,这就是个人设定的范围了。这里多加了一个时钟。
......
架构师成长之路1.1-系统监控工具htop的更多相关文章
- 架构师成长之路1.2-多功能系统信息统计工具dstat
点击返回架构师成长之路 架构师成长之路1.2-多功能系统信息统计工具dstat dstat命令是一个用来替换vmstat.iostat.netstat.nfsstat和ifstat这些命令的工具,是一 ...
- 架构师成长之路6.6 DNS服务器搭建(构建企业级DNS)
点击返回架构师成长之路 架构师成长之路6.6 DNS服务器搭建(构建企业级DNS) 采用LVS-DR模式负载均衡,多IDC,多套DNS集群,通过master-slave技术保证dns配置的一致性. 1 ...
- 架构师成长之路2.4-Kickstart文件剖析
点击返回架构师成长之路 架构师成长之路2.4-Kickstart文件剖析 kickstart文件是一个简单的文本文件,它包含了一个项目列表,每个项目由一个关键字来识别. 创建kickstart文件注意 ...
- 架构师成长之路3.1-Cobber原理及部署
点击返回架构师成长之路 架构师成长之路3.1-Cobber原理及部署 Cobbler是一个Linux服务器安装的服务,可以通过网络启动(PXE)的方式来快速安装.重装物理服务器和虚拟机,同时还可以管理 ...
- 架构师成长之路2.3-PXE+Kickstart无人值守大量部署Linux
点击返回架构师成长之路 架构师成长之路2.3-PXE+Kickstart无人值守大量部署Linux 所谓的无人值守,就是自动应答,当安装过程中需要人机交互提供某些选项的答案时(如如何分区),自动应答文 ...
- 架构师成长之路2.2-PXE+Kickstart安装部署
点击返回架构师成长之路 架构师成长之路2.2-PXE+Kickstart安装部署 系统测试环境: 实验环境:VMware Workstation 12 系统平台:CentOS Linux releas ...
- 架构师成长之路2.1-PXE+Kickstart原理
点击返回架构师成长之路 架构师成长之路2.1-PXE+Kickstart原理 PXE+Kickstart 主要用于在公司内网批量安装新服务器系统,这极大地简化了用光盘重复安装Linux操作系统的过程, ...
- 架构师成长之路5.2-Saltstack远程执行
点击架构师成长之路 架构师成长之路5.2-Saltstack远程执行 配置管理工具: Pupper:1. 采用ruby编程语言:2. 安装环境相对较复杂:3.不支持远程执行,需要FUNC工具配置才可以 ...
- 架构师成长之路5.7-Saltstack数据系统
点击架构师成长之路 架构师成长之路5.7-Saltstack数据系统 1. Saltstack的两种数据系统 Grains Pollars 2. Saltstack数据系统---Grains Grai ...
随机推荐
- mock使用中出现的错误
当出现错误Class mocking requires to have objenesis library in the classpath时,缺少了objenesis库文件...下载objenesi ...
- mysql图形化界面MySQL_Workbench
1,下载最新版本的MySQL Workbench,下载地址: http://www.mysql.com/downloads/workbench/ 2,安装Workbench的依赖组件两个 http ...
- 20155204《网络对抗》Exp 6 信息搜集与漏洞扫描
20155204<网络对抗>Exp 6 信息搜集与漏洞扫描 一.实验后回答问题 1.哪些组织负责DNS,IP的管理. 互联网名称与数字地址分配机构,简称ICANN机构,决定了域名和IP地址 ...
- 20155301 Exp9 Web安全基础
20155301 Exp9 Web安全基础 1.实验后回答问题 (1)SQL注入攻击原理,如何防御 答 :原理: 利用现有应用程序,将恶意的SQL命令注入到后台数据库引擎执行的能力,它可以通过在Web ...
- # 20155337《网络对抗》Exp7 网络欺诈防范
20155337<网络对抗>Exp7 网络欺诈防范 实践目标 实践内容 本实践的目标理解常用网络欺诈背后的原理,以提高防范意识,并提出具体防范方法.具体实践有 (1)简单应用SET工具建立 ...
- libgdx学习记录25——Rectangle与Circle是否重叠
Rect与Circle重叠有三种情况: 1. Rect至少有一个角在Circle里面 2. Circle与Rect的左边或右边相交,或者Circle在Rect内 3. Circle与Rect的顶边或底 ...
- django请求的生命周期
1. 概述 首先我们知道HTTP请求及服务端响应中传输的所有数据都是字符串. 在Django中,当我们访问一个的url时,会通过路由匹配进入相应的html网页中. Django的请求生命周期是指当用户 ...
- FastDFS教程Ⅰ-文件服务器安装与Nginx配置
1.简介 FastDFS是一个开源的轻量级分布式文件系统,它对文件进行管理,功能包括:文件存储.文件同步.文件访问(文件上传.文件下载)等,解决了大容量存储和负载均衡的问题.特别适合以文件为载 ...
- Android Studio开发实用网站收集
重点 1.Android Studio 调试技巧-断点调试 http://blog.csdn.net/qq_32452623/article/details/53769708 2.android st ...
- Apache Ignite 学习笔记(一): Ignite介绍、部署安装和REST/SQL客户端使用
Apache Ignite 介绍 Ignite是什么呢?先引用一段官网关于Ignite的描述: Ignite is memory-centric distributed database, cachi ...