{"id":1976,"date":"2015-03-07T21:40:11","date_gmt":"2015-03-07T13:40:11","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=1976"},"modified":"2015-03-07T21:40:11","modified_gmt":"2015-03-07T13:40:11","slug":"linux%e7%9a%84top%e5%91%bd%e4%bb%a4%e4%b8%ad%e7%9a%84virt%e3%80%81res%e3%80%81shr%e7%9a%84%e6%84%8f%e4%b9%89","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/1976.html","title":{"rendered":"Linux\u7684top\u547d\u4ee4\u4e2d\u7684VIRT\u3001RES\u3001SHR\u7684\u610f\u4e49"},"content":{"rendered":"<h6>\u641c\u7d22\u5173\u952e\u5b57\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?q=linux+top+virt+res\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=linux+top+virt+res<\/a><\/li>\n<li><a href=\"http:\/\/www.baidu.com\/s?wd=linux%20top%20VIRT%20RES%20SHR%20DATA\" target=\"_blank\">http:\/\/www.baidu.com\/s?wd=linux%20top%20VIRT%20RES%20SHR%20DATA<\/a><\/li>\n<\/ul>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/www.360doc.com\/content\/12\/0925\/21\/1072296_238157352.shtml\" target=\"_blank\">linux top\u547d\u4ee4VIRT,RES,SHR,DATA\u7684\u542b\u4e49<\/a><\/li>\n<li><a href=\"http:\/\/javawind.net\/p131\" target=\"_blank\">linux top\u547d\u4ee4VIRT,RES,SHR,DATA\u7684\u542b\u4e49<\/a><\/li>\n<li><a href=\"http:\/\/serverfault.com\/questions\/138427\/top-what-does-virtual-memory-size-mean-linux-ubuntu\" target=\"_blank\">http:\/\/serverfault.com\/questions\/138427\/top-what-does-virtual-memory-size-mean-linux-ubuntu<\/a><\/li>\n<li><a href=\"http:\/\/askubuntu.com\/questions\/176001\/what-does-virt-res-and-shr-means-in-the-top-command\" target=\"_blank\">http:\/\/askubuntu.com\/questions\/176001\/what-does-virt-res-and-shr-means-in-the-top-command<\/a><\/li>\n<li><a href=\"http:\/\/unix.stackexchange.com\/questions\/86588\/top-command-how-to-reduce-the-displayed-columns\" target=\"_blank\">http:\/\/unix.stackexchange.com\/questions\/86588\/top-command-how-to-reduce-the-displayed-columns<\/a><\/li>\n<\/ul>\n<p>==<\/p>\n<h6>VIRT\uff1avirtual memory usage \u865a\u62df\u5185\u5b58<\/h6>\n<p>1\u3001\u8fdb\u7a0b\u201c\u9700\u8981\u7684\u201d\u865a\u62df\u5185\u5b58\u5927\u5c0f\uff0c\u5305\u62ec\u8fdb\u7a0b\u4f7f\u7528\u7684\u5e93\u3001\u4ee3\u7801\u3001\u6570\u636e\u7b49<br \/>\n2\u3001\u5047\u5982\u8fdb\u7a0b\u7533\u8bf7100m\u7684\u5185\u5b58\uff0c\u4f46\u5b9e\u9645\u53ea\u4f7f\u7528\u4e8610m\uff0c\u90a3\u4e48\u5b83\u4f1a\u589e\u957f100m\uff0c\u800c\u4e0d\u662f\u5b9e\u9645\u7684\u4f7f\u7528\u91cf<\/p>\n<pre class=\"lang:default decode:true\">VIRT -- Virtual Image (kb)\n        The\u00a0 total\u00a0 amount\u00a0 of\u00a0 virtual\u00a0 memory\u00a0 used\u00a0 by the task.\u00a0 It includes all code, data and shared libraries\u00a0 plus\u00a0 pages\u00a0 that have\u00a0 been\u00a0 swapped out and pages that have been mapped but not used.<\/pre>\n<h6>RES\uff1aresident memory usage \u5e38\u9a7b\u5185\u5b58<\/h6>\n<p>1\u3001\u8fdb\u7a0b\u5f53\u524d\u4f7f\u7528\u7684\u5185\u5b58\u5927\u5c0f\uff0c\u4f46\u4e0d\u5305\u62ecswap out<br \/>\n2\u3001\u5305\u542b\u5176\u4ed6\u8fdb\u7a0b\u7684\u5171\u4eab<br \/>\n3\u3001\u5982\u679c\u7533\u8bf7100m\u7684\u5185\u5b58\uff0c\u5b9e\u9645\u4f7f\u752810m\uff0c\u5b83\u53ea\u589e\u957f10m\uff0c\u4e0eVIRT\u76f8\u53cd<br \/>\n4\u3001\u5173\u4e8e\u5e93\u5360\u7528\u5185\u5b58\u7684\u60c5\u51b5\uff0c\u5b83\u53ea\u7edf\u8ba1\u52a0\u8f7d\u7684\u5e93\u6587\u4ef6\u6240\u5360\u5185\u5b58\u5927\u5c0f<\/p>\n<pre class=\"lang:default decode:true\">RES -- Resident size (kb)\n        The non-swapped physical memory a task has used.<\/pre>\n<h6>SHR\uff1ashared memory \u5171\u4eab\u5185\u5b58<\/h6>\n<p>1\u3001\u9664\u4e86\u81ea\u8eab\u8fdb\u7a0b\u7684\u5171\u4eab\u5185\u5b58\uff0c\u4e5f\u5305\u62ec\u5176\u4ed6\u8fdb\u7a0b\u7684\u5171\u4eab\u5185\u5b58<br \/>\n2\u3001\u867d\u7136\u8fdb\u7a0b\u53ea\u4f7f\u7528\u4e86\u51e0\u4e2a\u5171\u4eab\u5e93\u7684\u51fd\u6570\uff0c\u4f46\u5b83\u5305\u542b\u4e86\u6574\u4e2a\u5171\u4eab\u5e93\u7684\u5927\u5c0f<br \/>\n3\u3001\u8ba1\u7b97\u67d0\u4e2a\u8fdb\u7a0b\u6240\u5360\u7684\u7269\u7406\u5185\u5b58\u5927\u5c0f\u516c\u5f0f\uff1aRES \u2013 SHR<br \/>\n4\u3001swap out\u540e\uff0c\u5b83\u5c06\u4f1a\u964d\u4e0b\u6765<\/p>\n<pre class=\"lang:default decode:true\">SHR -- Shared Mem size (kb)\n       The amount of shared memory used by a task.\u00a0 It simply reflects memory that could be potentially shared with other processes.<\/pre>\n<h6>DATA<\/h6>\n<p>1\u3001\u6570\u636e\u5360\u7528\u7684\u5185\u5b58\u3002\u5982\u679ctop\u6ca1\u6709\u663e\u793a\uff0c\u5148\u6309f\u952e\u518d\u6309s\u952e\u53ef\u4ee5\u663e\u793a\u51fa\u6765\u3002<br \/>\n2\u3001\u771f\u6b63\u7684\u8be5\u7a0b\u5e8f\u8981\u6c42\u7684\u6570\u636e\u7a7a\u95f4\uff0c\u662f\u771f\u6b63\u5728\u8fd0\u884c\u4e2d\u8981\u4f7f\u7528\u7684\u3002<\/p>\n<pre class=\"lang:default decode:true \">DATA -- Data+Stack size (kb)\n        The amount of virtual memory devoted to other\u00a0 than\u00a0 executable code, also known as the 'data resident set' size or DRS.<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u641c\u7d22\u5173\u952e\u5b57\uff1a http:\/\/search.aol.com\/aol\/search?q=linux+top+vir [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,11],"tags":[297],"class_list":["post-1976","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-linux","tag-top"],"views":6169,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/1976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=1976"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/1976\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=1976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=1976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=1976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}