{"id":63897,"date":"2025-04-29T14:50:04","date_gmt":"2025-04-29T06:50:04","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63897\/"},"modified":"2025-04-29T14:50:04","modified_gmt":"2025-04-29T06:50:04","slug":"linux%e6%9f%a5%e7%9c%8b%e8%bf%9b%e7%a8%8b%e8%bf%90%e8%a1%8c%e7%8a%b6%e6%80%81-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63897\/","title":{"rendered":"linux\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001"},"content":{"rendered":"<blockquote><p>\n  \u5728 linux \u7cfb\u7edf\u4e2d\uff0c\u4f7f\u7528 ps aux \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001\u3002\u6b64\u547d\u4ee4\u5c06\u663e\u793a\u8fdb\u7a0b\u7684 pid\u3001\u7528\u6237\u3001cpu \u4f7f\u7528\u7387\u3001\u5185\u5b58\u4f7f\u7528\u7387\u3001\u865a\u62df\u5185\u5b58\u5927\u5c0f\u3001\u9a7b\u7559\u96c6\u5927\u5c0f\u548c\u72b6\u6001\uff08\u5982\u8fd0\u884c\u3001\u4f11\u7720\u6216\u50f5\u5c38\uff09\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/17\/2024081718524489597.jpg\" class=\"aligncenter\" title=\"linux\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001\u63d2\u56fe\" alt=\"linux\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001\u63d2\u56fe\" \/><\/p>\n<p><strong>Linux \u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001<\/strong><\/p>\n<p>\u5728 Linux \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p><strong>ps aux<\/strong><\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u4ee5\u6811\u72b6\u7ed3\u6784\u5217\u51fa\u7cfb\u7edf\u4e2d\u7684\u6240\u6709\u8fdb\u7a0b\u53ca\u5176\u76f8\u5173\u4fe1\u606f\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li> <strong>PID (\u8fdb\u7a0b ID)\uff1a<\/strong>\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u552f\u4e00\u6807\u8bc6\u7b26\u3002<\/li>\n<li> <strong>USER (\u7528\u6237)\uff1a<\/strong>\u62e5\u6709\u8be5\u8fdb\u7a0b\u7684\u7528\u6237\u3002<\/li>\n<li> <strong>%CPU (CPU \u4f7f\u7528\u7387)\uff1a<\/strong>\u8fdb\u7a0b\u5f53\u524d\u4f7f\u7528\u7684 CPU \u767e\u5206\u6bd4\u3002<\/li>\n<li> <strong>%MEM (\u5185\u5b58\u4f7f\u7528\u7387)\uff1a<\/strong>\u8fdb\u7a0b\u5f53\u524d\u4f7f\u7528\u7684\u5185\u5b58\u767e\u5206\u6bd4\u3002<\/li>\n<li> <strong>VSZ (\u865a\u62df\u5185\u5b58\u5927\u5c0f)\uff1a<\/strong>\u8fdb\u7a0b\u4f7f\u7528\u7684\u865a\u62df\u5185\u5b58\u5927\u5c0f\u3002<\/li>\n<li> <strong>RSS (\u9a7b\u7559\u96c6\u5927\u5c0f)\uff1a<\/strong>\u8fdb\u7a0b\u4f7f\u7528\u7684\u7269\u7406\u5185\u5b58\u5927\u5c0f\u3002<\/li>\n<li>\n<p><strong>STAT (\u72b6\u6001)\uff1a<\/strong>\u8fdb\u7a0b\u5f53\u524d\u7684\u72b6\u6001\uff0c\u53ef\u80fd\u7684\u503c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>R\uff1a\u6b63\u5728\u8fd0\u884c<\/li>\n<li>S\uff1a\u4f11\u7720\uff08\u7b49\u5f85 CPU \u65f6\u95f4\uff09<\/li>\n<li>D\uff1a\u4e0d\u53ef\u4e2d\u65ad\u7761\u7720<\/li>\n<li>Z\uff1a\u50f5\u5c38\u8fdb\u7a0b\uff08\u5df2\u7ec8\u6b62\uff0c\u4f46\u5176\u7236\u8fdb\u7a0b\u5c1a\u672a\u56de\u6536\uff09<\/li>\n<li>T\uff1a\u5df2\u505c\u6b62\uff08\u5df2\u6682\u505c\u8fd0\u884c\uff09<\/li>\n<li>W\uff1a\u6b63\u5728\u5206\u9875<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<pre>ps aux | head -n 10<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u6253\u5370\u51fa\u524d 10 \u4e2a\u8fdb\u7a0b\u53ca\u5176\u76f8\u5173\u4fe1\u606f\uff1a<\/p>\n<pre>USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\nroot         1  0.0  0.0   8728   628 ?        Ss   07:33   0:00 \/sbin\/init\nroot         2  2.7  0.2  95608 16880 ?        S    07:33   0:01 \/usr\/lib\/systemd\/systemd --system --deserialize 22\nroot         3  0.0  0.2   8636   752 ?        S    07:33   0:00 \/lib\/systemd\/systemd-journald\nroot         5  0.0  0.0  10260   576 ?        S    07:33   0:00 \/sbin\/agetty --noissue --noclear tty1\nroot         7  0.0  0.0   9108   344 ?        S    07:33   0:00 \/sbin\/agetty --noissue --noclear tty2\nroot         8  0.0  0.0   9108   344 ?        S    07:33   0:00 \/sbin\/agetty --noissue --noclear tty3\nroot         9  0.0  0.0   9108   344 ?        S    07:33   0:00 \/sbin\/agetty --noissue --noclear tty4\nroot         11  0.0  0.0   9108   344 ?        S    07:33   0:00 \/sbin\/agetty --noissue --noclear tty5\nroot         12  0.0  0.0   9108   344 ?        S    07:33   0:00 \/sbin\/agetty --noissue --noclear tty6<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 linux \u7cfb\u7edf\u4e2d\uff0c\u4f7f\u7528 ps aux \u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001\u3002\u6b64\u547d\u4ee4\u5c06\u663e\u793a\u8fdb\u7a0b\u7684 pid\u3001\u7528\u6237\u3001cpu \u4f7f\u7528\u7387\u3001\u5185\u5b58\u4f7f\u7528\u7387\u3001\u865a\u62df\u5185\u5b58\u5927\u5c0f\u3001\u9a7b\u7559\u96c6\u5927\u5c0f\u548c\u72b6\u6001\uff08\u5982\u8fd0\u884c\u3001\u4f11\u7720\u6216\u50f5\u5c38\uff09\u3002 Linux \u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001 \u5728 Linux \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\uff1a ps aux \u6b64\u547d\u4ee4\u5c06\u4ee5\u6811\u72b6\u7ed3\u6784\u5217\u51fa\u7cfb\u7edf\u4e2d\u7684\u6240\u6709\u8fdb\u7a0b\u53ca\u5176\u76f8\u5173\u4fe1\u606f\uff0c\u5305\u62ec\uff1a PID (\u8fdb\u7a0b ID)\uff1a\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u552f\u4e00\u6807\u8bc6\u7b26\u3002 USER (\u7528\u6237)\uff1a\u62e5\u6709\u8be5\u8fdb\u7a0b\u7684\u7528\u6237\u3002 %CPU (CPU \u4f7f\u7528\u7387)\uff1a\u8fdb\u7a0b\u5f53\u524d\u4f7f\u7528\u7684 CPU \u767e\u5206\u6bd4\u3002 %MEM (\u5185\u5b58\u4f7f\u7528\u7387)\uff1a\u8fdb\u7a0b\u5f53\u524d\u4f7f\u7528\u7684\u5185\u5b58\u767e\u5206\u6bd4\u3002 VSZ (\u865a\u62df\u5185\u5b58\u5927\u5c0f)\uff1a\u8fdb\u7a0b\u4f7f\u7528\u7684\u865a\u62df\u5185\u5b58\u5927\u5c0f\u3002 RSS (\u9a7b\u7559\u96c6\u5927\u5c0f)\uff1a\u8fdb\u7a0b\u4f7f\u7528\u7684\u7269\u7406\u5185\u5b58\u5927\u5c0f\u3002 STAT (\u72b6\u6001)\uff1a\u8fdb\u7a0b\u5f53\u524d\u7684\u72b6\u6001\uff0c\u53ef\u80fd\u7684\u503c\u5305\u62ec\uff1a R\uff1a\u6b63\u5728\u8fd0\u884c S\uff1a\u4f11\u7720\uff08\u7b49\u5f85 CPU \u65f6\u95f4\uff09 D\uff1a\u4e0d\u53ef\u4e2d\u65ad\u7761\u7720 Z\uff1a\u50f5\u5c38\u8fdb\u7a0b\uff08\u5df2\u7ec8\u6b62\uff0c\u4f46\u5176\u7236\u8fdb\u7a0b\u5c1a\u672a\u56de\u6536\uff09 T\uff1a\u5df2\u505c\u6b62\uff08\u5df2\u6682\u505c\u8fd0\u884c\uff09 W\uff1a\u6b63\u5728\u5206\u9875 \u793a\u4f8b\uff1a ps aux | head -n 10 \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u5c06\u6253\u5370\u51fa\u524d 10 \u4e2a\u8fdb\u7a0b\u53ca\u5176\u76f8\u5173\u4fe1\u606f\uff1a USER PID [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-63897","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=63897"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63897\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}