9.ps<\/strong><\/strong><\/span><\/div>\nps \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 %MEM (percent of physical memory used), VSZ (totalamount of virtual memory used), and RSS (total amount of physical memory used)\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 \u201c\u2013sort\u201d \u9009\u9879\u5bf9\u8fdb\u7a0b\u8fdb\u884c\u6392\u5e8f\uff0c\u4f8b\u5982\u6309 RSS \u8fdb\u884c\u6392\u5e8f\uff1a<\/p>\n
$ ps aux | sort -rss<\/pre>\n\u56fe8\uff1aLinux\u4e0b\u67e5\u770b\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u65b9\u6cd5\u603b\u7ed3<\/p>\n
10.smem<\/strong><\/strong><\/span><\/div>\nsmem \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
\r\nsmem -P sshd -k\r\n PID User Command Swap USS PSS RSS \r\n 815 root \/usr\/sbin\/sshd 0 868.0K 951.0K 1.3M \r\n14104 root sshd: root@pts\/0 0 2.8M 3.5M 5.3M \r\n14292 root python \/usr\/bin\/smem -P ssh 0 5.1M 5.8M 7.2M \r\n<\/pre>\n11.top<\/strong><\/strong><\/span><\/div>\ntop \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
$\u00a0top<\/span><\/pre>\n12.vmstat<\/strong><\/strong><\/span><\/div>\nvmstat \u547d\u4ee4\u663e\u793a\u5b9e\u65f6\u7684\u548c\u5e73\u5747\u7684\u7edf\u8ba1\uff0c\u8986\u76d6 CPU\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","protected":false},"excerpt":{"rendered":"
\u67e5\u770b RAM \u4f7f\u7528\u60c5\u51b5\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u901a\u8fc7 \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 […]<\/p>\n","protected":false},"author":643,"featured_media":198072,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-197887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/197887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/643"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=197887"}],"version-history":[{"count":7,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/197887\/revisions"}],"predecessor-version":[{"id":198073,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/197887\/revisions\/198073"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/198072"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=197887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=197887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=197887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}