{"id":493,"date":"2016-04-27T14:45:17","date_gmt":"2016-04-27T14:45:17","guid":{"rendered":"2f55707d4193dc27118a0f19a1985716"},"modified":"2016-04-27T14:45:17","modified_gmt":"2016-04-27T14:45:17","slug":"","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/493","title":{"rendered":"Linux\u67e5\u770b\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u5185\u5bb9\u6765\u6e90\u4e8e\u7f51\u7edc<\/p>\n<h4>1. \/proc\/meminfo<\/h4>\n<p>\u67e5\u770bRAM\u4f7f\u7528\u60c5\u51b5\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u901a\u8fc7<code style=\"box-sizing:border-box;font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;\">\/proc\/meminfo<\/code>\u3002\u8fd9\u4e2a\u52a8\u6001\u66f4\u65b0\u7684\u865a\u62df\u6587\u4ef6\u5b9e\u9645\u4e0a\u662f\u8bb8\u591a\u5176\u4ed6\u5185\u5b58\u76f8\u5173\u5de5\u5177(\u5982\uff1afree \/ ps \/ top)\u7b49\u7684\u7ec4\u5408\u663e\u793a\u3002<code style=\"box-sizing:border-box;font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;\">\/proc\/meminfo<\/code>\u5217\u51fa\u4e86\u6240\u6709\u4f60\u60f3\u4e86\u89e3\u7684\u5185\u5b58\u7684\u4f7f\u7528\u60c5\u51b5\u3002\u8fdb\u7a0b\u7684\u5185\u5b58\u4f7f\u7528\u4fe1\u606f\u4e5f\u53ef\u4ee5\u901a\u8fc7\/proc\/&lt;pid&gt;\/statm \u548c \/proc\/&lt;pid&gt;\/status \u6765\u67e5\u770b\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ cat \/proc\/meminfo<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/f3cc1461739660.jpg\" id=\"ematt:389\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/f3cc1461739660.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>2. atop<\/h4>\n<p>atop\u547d\u4ee4\u662f\u4e00\u4e2a\u7ec8\u7aef\u73af\u5883\u7684\u76d1\u63a7\u547d\u4ee4\u3002\u5b83\u663e\u793a\u7684\u662f\u5404\u79cd\u7cfb\u7edf\u8d44\u6e90\uff08CPU, memory, network, I\/O, kernel\uff09\u7684\u7efc\u5408\uff0c\u5e76\u4e14\u5728\u9ad8\u8d1f\u8f7d\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u4e86\u5f69\u8272\u6807\u6ce8\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ sudo atop<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/15601461739661.jpg\" id=\"ematt:390\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/15601461739661.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>3. free<\/h4>\n<p>free\u547d\u4ee4\u662f\u4e00\u4e2a\u5feb\u901f\u67e5\u770b\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u7684\u65b9\u6cd5\uff0c\u5b83\u662f\u5bf9 \/proc\/meminfo \u6536\u96c6\u5230\u7684\u4fe1\u606f\u7684\u4e00\u4e2a\u6982\u8ff0\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ free -h<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/799b1461739662.jpg\" id=\"ematt:391\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/799b1461739662.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>4. GNOME System Monitor<\/h4>\n<p>GNOME System Monitor \u662f\u4e00\u4e2a\u663e\u793a\u6700\u8fd1\u4e00\u6bb5\u65f6\u95f4\u5185\u7684CPU\u3001\u5185\u5b58\u3001\u4ea4\u6362\u533a\u53ca\u7f51\u7edc\u7684\u4f7f\u7528\u60c5\u51b5\u7684\u89c6\u56fe\u5de5\u5177\u3002\u5b83\u8fd8\u63d0\u4f9b\u4e86\u4e00\u79cd\u67e5\u770bCPU\u53ca\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ gnome-system-monitor<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/d0091461739662.jpg\" id=\"ematt:392\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/d0091461739662.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>5. htop<\/h4>\n<p>htop\u547d\u4ee4\u663e\u793a\u4e86\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u5185\u5b58\u5b9e\u65f6\u4f7f\u7528\u7387\u3002\u5b83\u63d0\u4f9b\u4e86\u6240\u6709\u8fdb\u7a0b\u7684\u5e38\u9a7b\u5185\u5b58\u5927\u5c0f\u3001\u7a0b\u5e8f\u603b\u5185\u5b58\u5927\u5c0f\u3001\u5171\u4eab\u5e93\u5927\u5c0f\u7b49\u7684\u62a5\u544a\u3002\u5217\u8868\u53ef\u4ee5\u6c34\u5e73\u53ca\u5782\u76f4\u6eda\u52a8\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ htop<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/032b1461739663.jpg\" id=\"ematt:393\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/032b1461739663.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>6. KDE System Monitor<\/h4>\n<p>\u529f\u80fd\u540c 4 \u4e2d\u4ecb\u7ecd\u7684GENOME\u7248\u672c\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ ksysguard<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/18e21461739664.jpg\" id=\"ematt:394\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/18e21461739664.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>7. memstat<\/h4>\n<p>memstat\u662f\u4e00\u4e2a\u6709\u6548\u8bc6\u522bexecutable(s), process(es) and shared libraries\u4f7f\u7528\u865a\u62df\u5185\u5b58\u60c5\u51b5\u7684\u547d\u4ee4\u3002\u7ed9\u5b9a\u4e00\u4e2a\u8fdb\u7a0bID\uff0cmemstat\u53ef\u4ee5\u5217\u51fa\u8fd9\u4e2a\u8fdb\u7a0b\u76f8\u5173\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3001\u6570\u636e\u548c\u5171\u4eab\u5e93\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ memstat -p &lt;PID&gt;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/fe5d1461739665.jpg\" id=\"ematt:395\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/fe5d1461739665.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>8. nmon<\/h4>\n<p>nmon\u662f\u4e00\u4e2a\u57fa\u4e8encurses\u7684\u7cfb\u7edf\u57fa\u51c6\u6d4b\u8bd5\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u76d1\u63a7CPU\u3001\u5185\u5b58\u3001I\/O\u3001\u6587\u4ef6\u7cfb\u7edf\u53ca\u7f51\u7edc\u8d44\u6e90\u7b49\u7684\u4e92\u52a8\u6a21\u5f0f\u3002\u5bf9\u4e8e\u5185\u5b58\u7684\u4f7f\u7528\uff0c\u5b83\u53ef\u4ee5\u5b9e\u65f6\u7684\u663e\u793a \u603b\/\u5269\u4f59\u5185\u5b58\u3001\u4ea4\u6362\u7a7a\u95f4\u7b49\u4fe1\u606f\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ nmon<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/8cda1461739666.jpg\" id=\"ematt:396\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/8cda1461739666.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/8cda1461739666.jpg\" id=\"ematt:396\"><br \/>\n<\/a><\/p>\n<h4>9. ps<\/h4>\n<p>ps\u547d\u4ee4\u53ef\u4ee5\u5b9e\u65f6\u7684\u663e\u793a\u5404\u4e2a\u8fdb\u7a0b\u7684\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u3002Reported memory usage information includes<br \/>\n%MEM (percent of physical memory used), VSZ (total amount of virtual<br \/>\nmemory used), and RSS (total amount of physical memory used)\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<br \/>\n\u201c\u2013sort\u201d\u9009\u9879\u5bf9\u8fdb\u7a0b\u8fdb\u884c\u6392\u5e8f\uff0c\u4f8b\u5982\u6309RSS\u8fdb\u884c\u6392\u5e8f\uff1a<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ ps aux --sort -rss<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/8cda1461739666.jpg\" id=\"ematt:396\"><\/a><\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/30e61461739667.jpg\" id=\"ematt:397\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/30e61461739667.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>10. smem<\/h4>\n<p>smem\u547d\u4ee4\u5141\u8bb8\u4f60\u7edf\u8ba1\u57fa\u4e8e\/proc\u4fe1\u606f\u7684\u4e0d\u540c\u8fdb\u7a0b\u548c\u7528\u6237\u7684\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u3002\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u7684\u5206\u6790\u53ef\u4ee5\u5bfc\u51fa\u56fe\u8868\uff08\u5982\u6761\u5f62\u56fe\u548c\u997c\u56fe\uff09\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ sudo smem --pie name -c \"pss\"<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/ae561461739667.jpg\" id=\"ematt:398\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/ae561461739667.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>11. top<\/h4>\n<p>top\u547d\u4ee4\u63d0\u4f9b\u4e86\u5b9e\u65f6\u7684\u8fd0\u884c\u4e2d\u7684\u7a0b\u5e8f\u7684\u8d44\u6e90\u4f7f\u7528\u7edf\u8ba1\u3002\u4f60\u53ef\u4ee5\u6839\u636e\u5185\u5b58\u7684\u4f7f\u7528\u548c\u5927\u5c0f\u6765\u8fdb\u884c\u6392\u5e8f\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ top<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/62bf1461739668.jpg\" id=\"ematt:399\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/62bf1461739668.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>12. vmstat<\/h4>\n<p>vmstat\u547d\u4ee4\u663e\u793a\u5b9e\u65f6\u7684\u548c\u5e73\u5747\u7684\u7edf\u8ba1\uff0c\u8986\u76d6CPU\u3001\u5185\u5b58\u3001I\/O\u7b49\u5185\u5bb9\u3002\u4f8b\u5982\u5185\u5b58\u60c5\u51b5\uff0c\u4e0d\u4ec5\u663e\u793a\u7269\u7406\u5185\u5b58\uff0c\u4e5f\u7edf\u8ba1\u865a\u62df\u5185\u5b58\u3002<\/p>\n<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ vmstat -s<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u5185\u5bb9\u6765\u6e90\u4e8e\u7f51\u7edc<\/p>\n<h4>1. \/proc\/meminfo<\/h4>\n<p>\u67e5\u770bRAM\u4f7f\u7528\u60c5\u51b5\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u901a\u8fc7<code style=\"box-sizing:border-box;font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;\">\/proc\/meminfo<\/code>\u3002\u8fd9\u4e2a\u52a8\u6001\u66f4\u65b0\u7684\u865a\u62df\u6587\u4ef6\u5b9e\u9645\u4e0a\u662f\u8bb8\u591a\u5176\u4ed6\u5185\u5b58\u76f8\u5173\u5de5\u5177(\u5982\uff1afree \/ ps \/ top)\u7b49\u7684\u7ec4\u5408\u663e\u793a\u3002<code style=\"box-sizing:border-box;font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;\">\/proc\/meminfo<\/code>\u5217\u51fa\u4e86\u6240\u6709\u4f60\u60f3\u4e86\u89e3\u7684\u5185\u5b58\u7684\u4f7f\u7528\u60c5\u51b5\u3002\u8fdb\u7a0b\u7684\u5185\u5b58\u4f7f\u7528\u4fe1\u606f\u4e5f\u53ef\u4ee5\u901a\u8fc7\/proc\/&lt;pid&gt;\/statm \u548c \/proc\/&lt;pid&gt;\/status \u6765\u67e5\u770b\u3002<\/p>\n<table class=\"crayon-table\" style=\"box-sizing:border-box;font-size:12px;margin-left:0px;border-spacing:0px !important;border-collapse:collapse !important;border:none !important;padding:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-top:0px !important;background-image:none !important;width:auto !important;\">\n<tbody style=\"box-sizing:border-box;\">\n<tr class=\"crayon-row\" style=\"box-sizing:border-box;padding:0px !important;border:none !important;vertical-align:top !important;margin:0px !important;background-position:0px 50%;\">\n<td class=\"crayon-nums \" data-settings=\"show\" style=\"box-sizing:border-box;padding:0px 5px 0px 0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border-bottom-width:0px;margin:0px !important;border-right-style:solid !important;border-top-width:0px;border-right-width:1px !important;border-left-width:0px;border-right-color:#c8dac8 !important;color:#afafaf !important;background-position:0px 50%;background-repeat:initial initial;\">\n<p>1<\/p>\n<\/td>\n<td class=\"crayon-code\" style=\"box-sizing:border-box;padding:0px !important;font-family:'Courier New', monospace !important;vertical-align:top !important;border:0px;margin:0px !important;width:685px;background-position:0px 50%;background-repeat:initial initial;\">\n<p>$ cat \/proc\/meminfo<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201604\/f3cc1461739660.jpg\" id=\"ematt:389\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201604\/f3cc1461739660.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" width=\"500\" \/><\/a><\/p>\n<h4>2. atop<\/h4>\n<p>atop\u547d\u4ee4\u662f\u4e00\u4e2a\u7ec8\u7aef\u73af\u5883\u7684\u76d1\u63a7\u547d\u4ee4\u3002\u5b83\u663e\u793a\u7684\u662f\u5404\u79cd\u7cfb\u7edf\u8d44\u6e90\uff08CPU, memory, network, I\/O, kernel\uff09\u7684\u7efc...<\/p>\n<p> <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/493\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[287],"tags":[235,234],"class_list":["post-493","post","type-post","status-publish","format-standard","hentry","category-linux","tag-free","tag-top"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=493"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/493\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}