{"id":3581,"date":"2019-06-28T16:11:02","date_gmt":"2019-06-28T08:11:02","guid":{"rendered":"https:\/\/damogame.cn\/wordpress\/?p=3581"},"modified":"2019-06-28T16:11:02","modified_gmt":"2019-06-28T08:11:02","slug":"htop%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/3581","title":{"rendered":"htop\u8be6\u89e3"},"content":{"rendered":"<div><a href=\"https:\/\/www.cnblogs.com\/lazyfang\/p\/7650010.html\">\u539f\u6587\u5730\u5740<\/a><\/div>\n<div><\/div>\n<div class=\"clear\"><strong>\u4e00\u3001htop \u7b80\u4ecb<\/strong><\/div>\n<div class=\"postBody\">\n<div id=\"cnblogs_post_body\" class=\"blogpost-body\">\n<p>This is htop, an interactive process viewer for Linux. It is a text-mode application (for console or X terminals) and requires ncurses.<\/p>\n<p><strong>Comparison between htop and top<\/strong><\/p>\n<ul>\n<li>In &#8216;htop&#8217; you can scroll the list vertically and horizontally to see all processes and complete command lines.<\/li>\n<li>In &#8216;top&#8217; you are subject to a delay for each unassigned key you press (especially annoying when multi-key escape sequences are triggered by accident).<\/li>\n<li>&#8216;htop&#8217; starts faster (&#8216;top&#8217; seems to collect data for a while before displaying anything).<\/li>\n<li>In &#8216;htop&#8217; you don&#8217;t need to type the process number to kill a process, in &#8216;top&#8217; you do.<\/li>\n<li>In &#8216;htop&#8217; you don&#8217;t need to type the process number or the priority value to renice a process, in &#8216;top&#8217; you do.<\/li>\n<li>&#8216;htop&#8217; supports mouse operation, &#8216;top&#8217; doesn&#8217;t<\/li>\n<li>&#8216;top&#8217; is older, hence, more used and tested.<\/li>\n<\/ul>\n<p>htop \u662fLinux\u7cfb\u7edf\u4e2d\u7684\u4e00\u4e2a\u4e92\u52a8\u7684\u8fdb\u7a0b\u67e5\u770b\u5668\uff0c\u4e00\u4e2a\u6587\u672c\u6a21\u5f0f\u7684\u5e94\u7528\u7a0b\u5e8f(\u5728\u63a7\u5236\u53f0\u6216\u8005X\u7ec8\u7aef\u4e2d)\uff0c\u9700\u8981ncurses\u3002<\/p>\n<p>\u4e0eLinux\u4f20\u7edf\u7684top\u76f8\u6bd4\uff0chtop\u66f4\u52a0\u4eba\u6027\u5316\u3002\u5b83\u53ef\u8ba9\u7528\u6237\u4ea4\u4e92\u5f0f\u64cd\u4f5c\uff0c\u652f\u6301\u989c\u8272\u4e3b\u9898\uff0c\u53ef\u6a2a\u5411\u6216\u7eb5\u5411\u6eda\u52a8\u6d4f\u89c8\u8fdb\u7a0b\u5217\u8868\uff0c\u5e76\u652f\u6301\u9f20\u6807\u64cd\u4f5c\u3002<\/p>\n<p>\u4e0etop\u76f8\u6bd4\uff0chtop\u6709\u4ee5\u4e0b\u4f18\u70b9\uff1a<\/p>\n<ul>\n<li>\u53ef\u4ee5\u6a2a\u5411\u6216\u7eb5\u5411\u6eda\u52a8\u6d4f\u89c8\u8fdb\u7a0b\u5217\u8868\uff0c\u4ee5\u4fbf\u770b\u5230\u6240\u6709\u7684\u8fdb\u7a0b\u548c\u5b8c\u6574\u7684\u547d\u4ee4\u884c\u3002<\/li>\n<li>\u5728\u542f\u52a8\u4e0a\uff0c\u6bd4top \u66f4\u5feb\u3002<\/li>\n<li>\u6740\u8fdb\u7a0b\u65f6\u4e0d\u9700\u8981\u8f93\u5165\u8fdb\u7a0b\u53f7\u3002<\/li>\n<li>htop \u652f\u6301\u9f20\u6807\u64cd\u4f5c\u3002<\/li>\n<li>top \u5df2\u7ecf\u5f88\u8001\u4e86\u3002<\/li>\n<\/ul>\n<p>htop \u5b98\u7f51\uff1a<a title=\"http:\/\/htop.sourceforge.net\/\" href=\"http:\/\/htop.sourceforge.net\/\">http:\/\/htop.sourceforge.net\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u4e8c\uff0e\u8f6f\u4ef6\u7684\u83b7\u53d6\u4e0e\u5b89\u88c5<\/strong><\/p>\n<p>Htop\u7684\u5b89\u88c5\uff0c\u65e2\u53ef\u4ee5\u901a\u8fc7\u6e90\u7801\u5305\u7f16\u8bd1\u5b89\u88c5\uff0c\u4e5f\u53ef\u4ee5\u914d\u7f6e\u597dyum\u6e90\u540e\u7f51\u7edc\u4e0b\u8f7d\u5b89\u88c5<\/p>\n<p>2.1\u6e90\u7801\u5b89\u88c5<\/p>\n<p>\u5728htop\u7684\u9879\u76ee\u5b98\u65b9\u7f51\u7ad9\u4e0a\uff1a<a href=\"http:\/\/sourceforge.net\/projects\/htop\/\" rel=\"nofollow external\">http:\/\/sourceforge.net\/projects\/htop\/<\/a>\u76f4\u63a5\u4e0b\u8f7d\u5373\u53ef<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/static.open-open.com\/lib\/uploadImg\/20141203\/20141203210952_604.png\" alt=\"Linux htop\u5de5\u5177\u4f7f\u7528\u8be6\u89e3\" width=\"577\" height=\"78\" \/><\/p>\n<p>\u7531\u4e8e\u6211\u5df2\u7ecf\u5b89\u88c5\u8fc7\u4e86\uff0c\u56e0\u6b64\u5927\u5bb6\u770b\u4e2a\u4ee5\u4e0a\u6bcf\u4e2a\u7f16\u8bd1\u8fc7\u7a0b\u540e\u9762\u90fd\u4f1a^c\uff0c\u662f\u4e0d\u6267\u884c\u6b64\u884c\u64cd\u4f5cCtrl+c\u53d6\u6d88\u7684\uff0c\u6b64\u5904\u53ea\u662f\u544a\u77e5\u5982\u4f55\u7f16\u8bd1\u5b89\u88c5\u7684\uff0c\u5404\u4eba\u7684\u73af\u5883\u4e0d\u540c\uff0c\u53ef\u80fd\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4f1a\u51fa\u73b0\u9519\u8bef\uff0c\u6839\u636e\u9519\u8bef\uff0c\u89e3\u51b3\u540e\u5373\u53ef\u3002<\/p>\n<p>\u82e5\u51fa\u73b0\u9519\u8bef\uff1a<\/p>\n<p>configure: error: You may want to use &#8211;disable-unicode or install libncursesw.<\/p>\n<p>\u5219\u9700\u5b89\u88c5 ncurses-devel<\/p>\n<div class=\"cnblogs_code\">\n<pre>yum install ncurses-devel<\/pre>\n<\/div>\n<p>2.2 yum\u548crpm\u5305\u5b89\u88c5<\/p>\n<p>\u4e2a\u4eba\u63a8\u8350yum\u5b89\u88c5\uff0c\u80fd\u591f\u81ea\u52a8\u7684\u89e3\u51b3\u8f6f\u4ef6\u5305\u4f9d\u8d56\u5173\u7cfb\uff0c\u5b89\u88c5\u5373\u53ef\u3002<\/p>\n<p>\u5982\u679cyum\u6ca1\u6709htop\u5305\uff0c\u53ef\u4ee5\u6dfb\u52a0epel \u7684yum\u6e90\uff0c\u5177\u4f53\u8bf7\u53c2\u8003\u00a0<a href=\"http:\/\/www.cnblogs.com\/mchina\/archive\/2013\/01\/04\/2842275.html\">CentOS yum \u6e90\u7684\u914d\u7f6e\u4e0e\u4f7f\u7528<\/a>\u3002<\/p>\n<div class=\"cnblogs_code\">\n<pre>rpm -ivh http:\/\/download.fedoraproject.org\/pub\/epel\/5\/i386\/epel-release-5-4.noarch.rpm \r\nrpm --import \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL        \/\/\u5bfc\u5165key \r\nyum install htop<\/pre>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/static.open-open.com\/lib\/uploadImg\/20141203\/20141203210952_198.png\" alt=\"Linux htop\u5de5\u5177\u4f7f\u7528\u8be6\u89e3\" width=\"577\" height=\"235\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u4e09\u3001htop \u53c2\u6570<\/strong><\/p>\n<p>\u952e\u5165htop \u547d\u4ee4\uff0c\u6253\u5f00htop\u3002<\/p>\n<p># htop<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224047-b6fd5270cea14cee87544ff3ca193b34.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"3\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224048-e798f9f6de94490885989b39970a8270.jpg\" alt=\"3\" width=\"900\" height=\"464\" border=\"0\" \/><\/a><\/p>\n<p>\u4e0a\u9762\u5de6\u4e0a\u89d2\u663e\u793aCPU\u3001\u5185\u5b58\u3001\u4ea4\u6362\u533a\u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u53f3\u8fb9\u663e\u793a\u4efb\u52a1\u3001\u8d1f\u8f7d\u3001\u5f00\u673a\u65f6\u95f4\uff0c\u4e0b\u9762\u5c31\u662f\u8fdb\u7a0b\u5b9e\u65f6\u72b6\u51b5\u3002<\/p>\n<p>\u4e0b\u9762\u662f F1~F10 \u7684\u529f\u80fd\u548c\u5bf9\u5e94\u7684\u5b57\u6bcd\u5feb\u6377\u952e\u3002<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"109\"><strong>Shortcut Key<\/strong><\/td>\n<td valign=\"top\" width=\"112\"><strong>Function Key<\/strong><\/td>\n<td valign=\"top\" width=\"214\"><strong>Description<\/strong><\/td>\n<td valign=\"top\" width=\"311\"><strong>\u4e2d\u6587\u8bf4\u660e<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">h, ?<\/td>\n<td valign=\"top\" width=\"112\">F1<\/td>\n<td valign=\"top\" width=\"214\">Invoke htop Help<\/td>\n<td valign=\"top\" width=\"311\">\u67e5\u770bhtop\u4f7f\u7528\u8bf4\u660e<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">S<\/td>\n<td valign=\"top\" width=\"112\">F2<\/td>\n<td valign=\"top\" width=\"214\">Htop Setup Menu<\/td>\n<td valign=\"top\" width=\"311\">htop \u8bbe\u5b9a<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">\/<\/td>\n<td valign=\"top\" width=\"112\">F3<\/td>\n<td valign=\"top\" width=\"214\">Search for a Process<\/td>\n<td valign=\"top\" width=\"311\">\u641c\u7d22\u8fdb\u7a0b<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">\\<\/td>\n<td valign=\"top\" width=\"112\">F4<\/td>\n<td valign=\"top\" width=\"214\">Incremental process filtering<\/td>\n<td valign=\"top\" width=\"311\">\u589e\u91cf\u8fdb\u7a0b\u8fc7\u6ee4\u5668<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">t<\/td>\n<td valign=\"top\" width=\"112\">F5<\/td>\n<td valign=\"top\" width=\"214\">Tree View<\/td>\n<td valign=\"top\" width=\"311\">\u663e\u793a\u6811\u5f62\u7ed3\u6784<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">&lt;, &gt;<\/td>\n<td valign=\"top\" width=\"112\">F6<\/td>\n<td valign=\"top\" width=\"214\">Sort by a column<\/td>\n<td valign=\"top\" width=\"311\">\u9009\u62e9\u6392\u5e8f\u65b9\u5f0f<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">[<\/td>\n<td valign=\"top\" width=\"112\">F7<\/td>\n<td valign=\"top\" width=\"214\">Nice &#8211; (change priority)<\/td>\n<td valign=\"top\" width=\"311\">\u53ef\u51cf\u5c11nice\u503c\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u63d0\u9ad8\u5bf9\u5e94\u8fdb\u7a0b\u7684\u4f18\u5148\u7ea7<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">]<\/td>\n<td valign=\"top\" width=\"112\">F8<\/td>\n<td valign=\"top\" width=\"214\">Nice + (change priority)<\/td>\n<td valign=\"top\" width=\"311\">\u53ef\u589e\u52a0nice\u503c\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u964d\u4f4e\u5bf9\u5e94\u8fdb\u7a0b\u7684\u4f18\u5148\u7ea7<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">k<\/td>\n<td valign=\"top\" width=\"112\">F9<\/td>\n<td valign=\"top\" width=\"214\">Kill a Process<\/td>\n<td valign=\"top\" width=\"311\">\u53ef\u5bf9\u8fdb\u7a0b\u4f20\u9012\u4fe1\u53f7<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">q<\/td>\n<td valign=\"top\" width=\"112\">F10<\/td>\n<td valign=\"top\" width=\"214\">Quit htop<\/td>\n<td valign=\"top\" width=\"311\">\u7ed3\u675fhtop<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong>\u547d\u4ee4\u884c\u9009\u9879\uff08COMMAND-LINE OPTIONS\uff09<\/strong><\/p>\n<p>-C &#8211;no-color\u3000\u3000\u3000\u3000\u00a0\u3000\u3000\u00a0\u4f7f\u7528\u4e00\u4e2a\u5355\u8272\u7684\u914d\u8272\u65b9\u6848<\/p>\n<p>-d &#8211;delay=DELAY\u3000\u3000\u3000\u3000\u00a0\u8bbe\u7f6e\u5ef6\u8fdf\u66f4\u65b0\u65f6\u95f4\uff0c\u5355\u4f4d\u79d2<\/p>\n<p>-h &#8211;help\u3000\u3000\u3000\u3000\u3000\u3000 \u00a0\u3000\u3000\u00a0\u663e\u793ahtop \u547d\u4ee4\u5e2e\u52a9\u4fe1\u606f<\/p>\n<p>-u &#8211;user=USERNAME\u3000\u3000 \u00a0\u53ea\u663e\u793a\u4e00\u4e2a\u7ed9\u5b9a\u7684\u7528\u6237\u7684\u8fc7\u7a0b<\/p>\n<p>-p &#8211;pid=PID,PID\u2026\u3000\u3000\u3000 \u00a0 \u00a0\u53ea\u663e\u793a\u7ed9\u5b9a\u7684PIDs<\/p>\n<p>-s &#8211;sort-key COLUMN\u3000 \u00a0 \u00a0\u4f9d\u6b64\u5217\u6765\u6392\u5e8f<\/p>\n<p>-v \u2013version\u3000\u3000\u3000\u3000\u3000\u3000\u3000 \u00a0\u00a0\u663e\u793a\u7248\u672c\u4fe1\u606f<\/p>\n<p><strong>\u4ea4\u4e92\u5f0f\u547d\u4ee4\uff08INTERACTIVE COMMANDS\uff09<\/strong><\/p>\n<p>\u4e0a\u4e0b\u952e\u6216<strong>PgUP, PgDn<\/strong>\u00a0\u9009\u5b9a\u60f3\u8981\u7684\u8fdb\u7a0b\uff0c\u5de6\u53f3\u952e\u6216<strong>Home, End<\/strong>\u00a0\u79fb\u52a8\u5b57\u6bb5\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u76f4\u63a5\u7528\u9f20\u6807\u9009\u5b9a\u8fdb\u7a0b\uff1b<\/p>\n<p><strong>Space<\/strong>\u00a0\u00a0\u00a0 \u6807\u8bb0\/\u53d6\u6d88\u6807\u8bb0\u4e00\u4e2a\u8fdb\u7a0b\u3002\u547d\u4ee4\u53ef\u4ee5\u4f5c\u7528\u4e8e\u591a\u4e2a\u8fdb\u7a0b\uff0c\u4f8b\u5982 &#8220;kill&#8221;\uff0c\u5c06\u5e94\u7528\u4e8e\u6240\u6709\u5df2\u6807\u8bb0\u7684\u8fdb\u7a0b<\/p>\n<p><strong>U<\/strong>\u00a0\u00a0\u00a0 \u53d6\u6d88\u6807\u8bb0\u6240\u6709\u8fdb\u7a0b<\/p>\n<p><strong>s<\/strong>\u00a0\u00a0\u00a0 \u9009\u62e9\u67d0\u4e00\u8fdb\u7a0b\uff0c\u6309s:\u7528strace\u8ffd\u8e2a\u8fdb\u7a0b\u7684\u7cfb\u7edf\u8c03\u7528<\/p>\n<p><strong>l<\/strong>\u00a0 \u00a0 \u663e\u793a\u8fdb\u7a0b\u6253\u5f00\u7684\u6587\u4ef6: \u5982\u679c\u5b89\u88c5\u4e86lsof\uff0c\u6309\u6b64\u952e\u53ef\u4ee5\u663e\u793a\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6<\/p>\n<p><strong>I<\/strong>\u00a0 \u00a0 \u5012\u8f6c\u6392\u5e8f\u987a\u5e8f\uff0c\u5982\u679c\u6392\u5e8f\u662f\u6b63\u5e8f\u7684\uff0c\u5219\u53cd\u8f6c\u6210\u5012\u5e8f\u7684\uff0c\u53cd\u4e4b\u4ea6\u7136<\/p>\n<p><strong>+, &#8211;<\/strong>\u00a0\u00a0\u00a0 When in tree view mode, expand or collapse subtree. When a subtree is collapsed a &#8220;+&#8221; sign shows to the left of the process name.<\/p>\n<p><strong>a (\u5728\u6709\u591a\u5904\u7406\u5668\u7684\u673a\u5668\u4e0a)<\/strong>\u00a0 \u00a0 \u8bbe\u7f6e CPU affinity: \u6807\u8bb0\u4e00\u4e2a\u8fdb\u7a0b\u5141\u8bb8\u4f7f\u7528\u54ea\u4e9bCPU<\/p>\n<p><strong>u<\/strong>\u00a0 \u00a0 \u663e\u793a\u7279\u5b9a\u7528\u6237\u8fdb\u7a0b<\/p>\n<p><strong>M\u00a0<\/strong>\u00a0\u00a0 \u6309Memory \u4f7f\u7528\u6392\u5e8f<\/p>\n<p><strong>P<\/strong>\u00a0\u00a0\u00a0 \u6309CPU \u4f7f\u7528\u6392\u5e8f<\/p>\n<p><strong>T\u00a0<\/strong>\u00a0\u00a0 \u6309Time+ \u4f7f\u7528\u6392\u5e8f<\/p>\n<p><strong>F<\/strong>\u00a0\u00a0\u00a0 \u8ddf\u8e2a\u8fdb\u7a0b: \u5982\u679c\u6392\u5e8f\u987a\u5e8f\u5f15\u8d77\u9009\u5b9a\u7684\u8fdb\u7a0b\u5728\u5217\u8868\u4e0a\u5230\u5904\u79fb\u52a8\uff0c\u8ba9\u9009\u5b9a\u6761\u8ddf\u968f\u8be5\u8fdb\u7a0b\u3002\u8fd9\u5bf9\u76d1\u89c6\u4e00\u4e2a\u8fdb\u7a0b\u975e\u5e38\u6709\u7528\uff1a\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u4f60\u53ef\u4ee5\u8ba9\u4e00\u4e2a\u8fdb\u7a0b\u5728\u5c4f\u5e55\u4e0a\u4e00\u76f4\u53ef\u89c1\u3002\u4f7f\u7528\u65b9\u5411\u952e\u4f1a\u505c\u6b62\u8be5\u529f\u80fd\u3002<\/p>\n<p><strong>K<\/strong>\u00a0\u00a0\u00a0 \u663e\u793a\/\u9690\u85cf\u5185\u6838\u7ebf\u7a0b<\/p>\n<p><strong>H\u00a0<\/strong>\u00a0\u00a0 \u663e\u793a\/\u9690\u85cf\u7528\u6237\u7ebf\u7a0b<\/p>\n<p><strong>Ctrl-L<\/strong>\u00a0 \u00a0 \u5237\u65b0<\/p>\n<p><strong>Numbers\u00a0<\/strong>\u00a0\u00a0 PID \u67e5\u627e: \u8f93\u5165PID\uff0c\u5149\u6807\u5c06\u79fb\u52a8\u5230\u76f8\u5e94\u7684\u8fdb\u7a0b\u4e0a<\/p>\n<p><strong>\u56db\u3001htop \u4f7f\u7528<\/strong><\/p>\n<p>4.1. \u663e\u793a\u81ea\u5e26\u5e2e\u52a9<\/p>\n<p>\u9f20\u6807\u70b9\u51fbHelp\u6216\u8005\u6309F1 \u663e\u793a\u81ea\u5e26\u5e2e\u52a9<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224049-575f66ab3d964c5cb419959aee9032b1.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"4\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224050-75be8605449248f999bde75c6697522f.jpg\" alt=\"4\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>4.2. htop \u8bbe\u5b9a<\/p>\n<p>\u9f20\u6807\u70b9\u51fbSetup\u6216\u8005\u6309\u4e0bF2 \u4e4b\u540e\u8fdb\u5165htop \u8bbe\u5b9a\u7684\u9875\u9762\uff0cMeters \u9875\u9762\u8bbe\u5b9a\u4e86\u9876\u7aef\u7684\u4e00\u4e9b\u4fe1\u606f\u663e\u793a\uff0c\u9876\u7aef\u7684\u663e\u793a\u53c8\u5206\u4e3a\u5de6\u53f3\u4e24\u4fa7\uff0c\u5230\u5e95\u80fd\u663e\u793a\u4e9b\u4ec0\u4e48\u53ef\u4ee5\u5728\u6700\u53f3\u4fa7\u90a3\u680f\u65b0\u589e\uff0c\u8981\u65b0\u589e\u5230\u4e0a\u65b9\u5de6\u4fa7\uff08F5\uff09\u6216\u662f\u53f3\u4fa7\uff08F6\uff09\u90fd\u53ef\u4ee5\uff0c\u8fd9\u5c31\u662f\u4e2a\u4eba\u8bbe\u5b9a\u7684\u8303\u56f4\u4e86\u3002\u8fd9\u91cc\u591a\u52a0\u4e86\u4e00\u4e2a\u65f6\u949f\u3002<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224051-9b4d728776d1499190c9d21ab3615f5a.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"8\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224052-570be85130854977aa4bc9f796fb0eb1.jpg\" alt=\"8\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>\u4e0a\u65b9\u5de6\u53f3\u4e24\u680f\u7684\u663e\u793a\u65b9\u5f0f\u5206\u4e3aText Bar Graph Led \u56db\u79cd\uff0c\u4e0b\u56fe\u6211\u5c31\u628a cpu memory swap \u6539\u6210\u6587\u672c\u6a21\u5f0f\u663e\u793a\uff0c\u7136\u540e\u53f3\u680f\u7684\u6539\u6210Bar \u663e\u793a\uff0cclock \u7528LED\u65b9\u5f0f\u663e\u793a\u3002\u6570\u636e\u663e\u793a\u90fd\u5dee\u4e0d\u591a\uff0c\u53ea\u662f\u8fd9\u6837\u770b\u6709\u70b9\u4e0d\u4e60\u60ef\u4e86\u3002<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224052-befc1e283e4c4576a59f89e6f72a4337.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"9\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224053-eca0d56c388240e495c0b3226ed45472.jpg\" alt=\"9\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>\u5173\u4e8eDisplay options \u7684\u8bbe\u5b9a\uff0c\u53ef\u8981\u6839\u636e\u7ba1\u7406\u8005\u81ea\u5df1\u7684\u9700\u8981\u6765\u8bbe\u5b9a\u3002<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224054-b8d7722ac20b421299bd0c72b3394198.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"10\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224054-97538b88011d4b6fb49e7d48ec7b4263.jpg\" alt=\"10\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>\u989c\u8272\u9009\u62e9\uff0c\u9664\u4e86\u57fa\u672c\u7684\u989c\u8272\u663e\u793a\u4e4b\u5916\uff0chtop \u8fd8\u63d0\u4f9b\u4e86\u6362\u9762\u677f\u7684\u529f\u80fd\uff0c\u5176\u5b9e\u4e5f\u53ea\u662f\u6539\u53d8\u4e00\u4e9b\u8272\u5f69\u663e\u793a\u7684\u8bbe\u5b9a\uff0c\u867d\u7136\u8bf4\u4e0d\u80fd\u81ea\u5b9a\u4e49\u5230\u7ec6\u90e8\u7684\u989c\u8272\u663e\u793a\uff0c\u4f46\u662f\u81f3\u5c11\u63d0\u4f9b\u4e86\u51e0\u79cd\u98ce\u683c\u53ef\u4ee5\u9009\u62e9\u3002<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224055-b6a13eb2abaa45fab167e61a8db12356.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"11\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224056-2f6114304f37492095545a4ad6a68986.jpg\" alt=\"11\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>\u6700\u540e\u4e00\u9879\u7684\u8bbe\u5b9a\u662f\u8c03\u6574 Columns \u7684\u663e\u793a\uff0c\u5c31\u662f\u5728\u4e00\u822chtop \u6307\u4ee4\u8fdb\u6765\u5e0c\u671b\u53ef\u4ee5\u770b\u5230\u7684\u4ec0\u4e48\u6837\u7684\u6570\u636e\u53ca\u4fe1\u606f\uff0c\u5b57\u6bb5\u7684\u8c03\u6574\u53ef\u4ee5\u5728\u8fd9\u8fb9\u505a\u4e2a\u4eba\u5316\u7684\u8bbe\u5b9a\uff0c\u4e00\u822c\u4f7f\u7528\u7cfb\u7edf\u9ed8\u8ba4\u503c\u5c31\u597d\u4e86\u3002<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224058-1ef4f726ccd64dfbaab68142dc9a95be.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"12\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224059-a5ece1fdc31e420da897d01167e97550.jpg\" alt=\"12\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>4.3. \u641c\u7d22\u8fdb\u7a0b<\/p>\n<p>\u9f20\u6807\u70b9\u51fbSearch \u6216\u8005\u6309\u4e0bF3 \u6216\u8005\u8f93\u5165&#8221;\/&#8221;\uff0c \u8f93\u5165\u8fdb\u7a0b\u540d\u8fdb\u884c\u641c\u7d22\uff0c\u4f8b\u5982\u641c\u7d22ssh<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224100-dab0040192b24614b44d1e28d1b4badb.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"5\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224101-da92613d580148e7a74b5bde960bbbb8.jpg\" alt=\"5\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>4.4. \u8fc7\u6ee4\u5668<\/p>\n<p>\u6309\u4e0bF4\uff0c\u8fdb\u5165\u8fc7\u6ee4\u5668\uff0c\u76f8\u5f53\u4e8e\u5173\u952e\u5b57\u641c\u7d22\uff0c\u4e0d\u533a\u5206\u5927\u5c0f\u5199\uff0c\u4f8b\u5982\u8fc7\u6ee4dev<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224102-6339cac4da0b482097e1a5b218b523c4.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"15\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224103-ee01abbe5a7d4f5388057a52bd52e109.jpg\" alt=\"15\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>4.5. \u663e\u793a\u6811\u5f62\u7ed3\u6784<\/p>\n<p>\u8f93\u5165&#8221;t&#8221;\u6216\u6309\u4e0bF5\uff0c\u663e\u793a\u6811\u5f62\u7ed3\u6784\uff0c\u610f\u601d\u8ddfpstree \u5dee\u4e0d\u591a\uff0c\u80fd\u770b\u5230\u6240\u6709\u7a0b\u5e8f\u6811\u72b6\u6267\u884c\u7684\u7ed3\u6784\uff0c\u8fd9\u5bf9\u4e8e\u7cfb\u7edf\u7ba1\u7406\u6765\u8bf4\u76f8\u5f53\u65b9\u4fbf\uff0c\u7406\u6e05\u7a0b\u5e8f\u662f\u5982\u4f55\u4ea7\u751f\u7684\uff0c\u5f53\u7136\u6811\u72b6\u7ed3\u6784\u7684\u6d4f\u89c8\u4e5f\u53ef\u4ee5\u4f9d\u7167\u5176\u4ed6\u6570\u636e\u6765\u6392\u5e8f\u3002<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224104-f5d4a8c905cd4a83b262ad2e5944f3fe.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"6\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224105-44b98e747b494234929f8af4e3eeb5e4.jpg\" alt=\"6\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>4.6. \u9009\u62e9\u6392\u5e8f\u65b9\u5f0f<\/p>\n<p>\u6309\u4e0bF6 \u5c31\u53ef\u4ee5\u9009\u62e9\u4f9d\u7167\u4ec0\u4e48\u6765\u6392\u5e8f\uff0c\u6700\u5e38\u6392\u5e8f\u7684\u5185\u5bb9\u5c31\u662fcpu \u548cmemory \u5427\uff01<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224107-6a091d2523cd4829b243f635b1c32a0a.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"13\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224111-2f34d96612bd420ebcf9471c7339fc63.jpg\" alt=\"13\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>4.7 \u64cd\u4f5c\u8fdb\u7a0b<\/p>\n<p>F7\u3001F8\u5206\u522b\u5bf9\u5e94nice-\u548cnice+\uff0cF9\u5bf9\u5e94kill\u7ed9\u8fdb\u7a0b\u53d1\u4fe1\u53f7\uff0c\u9009\u597d\u4fe1\u53f7\u56de\u8f66\u5c31OK\u4e86<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224112-9dc1706a8dbd4972b78a78af34f75ec7.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"14\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224113-0e383c20b0e74196a393586b72a67ba1.jpg\" alt=\"14\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p>4.8. \u663e\u793a\u67d0\u4e2a\u7528\u6237\u7684\u8fdb\u7a0b\uff0c\u5728\u5de6\u4fa7\u9009\u62e9\u7528\u6237<\/p>\n<p>\u8f93\u5165&#8221;u&#8221;\uff0c\u5728\u5de6\u4fa7\u9009\u62e9\u7528\u6237<\/p>\n<p><a href=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224115-289b4cf95c344dada4aa048c25f821ce.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"7\" src=\"https:\/\/images0.cnblogs.com\/blog\/370046\/201301\/12224116-5b7ca92b8c644464a65a11204e346f49.jpg\" alt=\"7\" width=\"900\" height=\"465\" border=\"0\" \/><\/a><\/p>\n<p><strong>\u4e94\u3001Alias top<\/strong><\/p>\n<p>\u4e5f\u8bb8\u4f60\u7528\u60ef\u4e86top\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u7528top\u6765\u6253\u5f00htop\u3002<\/p>\n<p>\u7f16\u8f91\/root\/.bashrc\u6587\u4ef6\uff0c\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801<\/p>\n<div class=\"cnblogs_code\">\n<pre>if [ -f \/usr\/local\/bin\/htop ]; then\r\n    alias top=\u2019\/usr\/local\/bin\/htop\u2019\r\nfi<\/pre>\n<\/div>\n<div class=\"cnblogs_code\">\n<pre>source \/root\/.bashrc<\/pre>\n<\/div>\n<pre>\r\n\r\n\u53c2\u8003\uff1a\r\nhttp:\/\/www.cnblogs.com\/mchina\/archive\/2013\/03\/15\/2858041.html\r\nhttp:\/\/www.open-open.com\/lib\/view\/open1417612210323.html<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u5730\u5740 \u4e00\u3001htop \u7b80\u4ecb This <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[117],"class_list":["post-3581","post","type-post","status-publish","format-standard","hentry","tag-01-linux"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/3581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=3581"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/3581\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=3581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=3581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=3581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}