{"id":63883,"date":"2025-04-29T13:11:27","date_gmt":"2025-04-29T05:11:27","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63883\/"},"modified":"2025-04-29T13:11:27","modified_gmt":"2025-04-29T05:11:27","slug":"linux%e6%9f%a5%e7%9c%8b%e8%bf%9b%e7%a8%8b%e8%bf%90%e8%a1%8c%e6%97%b6%e9%95%bf-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63883\/","title":{"rendered":"linux\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u65f6\u957f"},"content":{"rendered":"<blockquote><p>\n  linux \u4e2d\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u65f6\u957f\u53ef\u4f7f\u7528\u547d\u4ee4\uff1aps aux | grep -v grep | awk &#8216;{print $2, $10, $8, $9}&#8217;\uff0c\u5176\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u4fe1\u606f\uff1a1. pid\uff08\u8fdb\u7a0b id\uff09\uff1b2. stime\uff08\u8fdb\u7a0b\u542f\u52a8\u65f6\u95f4\uff09\uff1b3. %cpu\uff08\u5f53\u524d cpu \u4f7f\u7528\u7387\uff09\uff1b4. %mem\uff08\u5f53\u524d\u5185\u5b58\u4f7f\u7528\u7387\uff09\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/17\/2024081718395731405.jpg\" class=\"aligncenter\" title=\"linux\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u65f6\u957f\u63d2\u56fe\" alt=\"linux\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u65f6\u957f\u63d2\u56fe\" \/><\/p>\n<p><strong>Linux \u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u65f6\u957f<\/strong><\/p>\n<p>\u8981\u67e5\u770b Linux \u4e2d\u8fdb\u7a0b\u8fd0\u884c\u7684\u65f6\u957f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p><strong>ps aux | grep -v grep | awk &#8216;{print $2, $10, $8, $9}&#8217;<\/strong><\/p>\n<p>\u6b64\u547d\u4ee4\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\n<ul>\n<li> <strong>PID (\u5b57\u6bb5 2)\uff1a<\/strong>\u8fdb\u7a0b\u7684\u8fdb\u7a0b ID<\/li>\n<li> <strong>STIME (\u5b57\u6bb5 10)\uff1a<\/strong>\u8fdb\u7a0b\u542f\u52a8\u7684\u65f6\u95f4\uff0c\u683c\u5f0f\u4e3a &#8220;HH:MM:SS&#8221;<\/li>\n<li> <strong>%CPU (\u5b57\u6bb5 8)\uff1a<\/strong>\u8fdb\u7a0b\u5f53\u524d\u4f7f\u7528\u7684 CPU \u767e\u5206\u6bd4<\/li>\n<li> <strong>%MEM (\u5b57\u6bb5 9)\uff1a<\/strong>\u8fdb\u7a0b\u5f53\u524d\u4f7f\u7528\u7684\u5185\u5b58\u767e\u5206\u6bd4<\/li>\n<\/ul>\n<p><strong>\u793a\u4f8b\u8f93\u51fa\uff1a<\/strong><\/p>\n<pre>12345 14:30:00 2.5 5.0\n23456 15:15:00 1.0 2.0\n34567 16:00:00 3.0 6.0<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ece\u4e0a\u4f8b\u4e2d\uff0c\u53ef\u4ee5\u770b\u51fa\uff1a<\/p>\n<ul>\n<li>PID \u4e3a 12345 \u7684\u8fdb\u7a0b\u81ea 14:30:00 \u5f00\u59cb\u8fd0\u884c\uff0c\u5f53\u524d\u4f7f\u7528 2.5% \u7684 CPU \u548c 5.0% \u7684\u5185\u5b58\u3002<\/li>\n<li>PID \u4e3a 23456 \u7684\u8fdb\u7a0b\u81ea 15:15:00 \u5f00\u59cb\u8fd0\u884c\uff0c\u5f53\u524d\u4f7f\u7528 1.0% \u7684 CPU \u548c 2.0% \u7684\u5185\u5b58\u3002<\/li>\n<li>PID \u4e3a 34567 \u7684\u8fdb\u7a0b\u81ea 16:00:00 \u5f00\u59cb\u8fd0\u884c\uff0c\u5f53\u524d\u4f7f\u7528 3.0% \u7684 CPU \u548c 6.0% \u7684\u5185\u5b58\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u65f6\u957f\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>linux \u4e2d\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u65f6\u957f\u53ef\u4f7f\u7528\u547d\u4ee4\uff1aps aux | grep -v grep | awk &#8216;{print $2, $10, $8, $9}&#8217;\uff0c\u5176\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u4fe1\u606f\uff1a1. pid\uff08\u8fdb\u7a0b id\uff09\uff1b2. stime\uff08\u8fdb\u7a0b\u542f\u52a8\u65f6\u95f4\uff09\uff1b3. %cpu\uff08\u5f53\u524d cpu \u4f7f\u7528\u7387\uff09\uff1b4. %mem\uff08\u5f53\u524d\u5185\u5b58\u4f7f\u7528\u7387\uff09\u3002 Linux \u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u65f6\u957f \u8981\u67e5\u770b Linux \u4e2d\u8fdb\u7a0b\u8fd0\u884c\u7684\u65f6\u957f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a ps aux | grep -v grep | awk &#8216;{print $2, $10, $8, $9}&#8217; \u6b64\u547d\u4ee4\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u4fe1\u606f\uff1a PID (\u5b57\u6bb5 2)\uff1a\u8fdb\u7a0b\u7684\u8fdb\u7a0b ID STIME (\u5b57\u6bb5 10)\uff1a\u8fdb\u7a0b\u542f\u52a8\u7684\u65f6\u95f4\uff0c\u683c\u5f0f\u4e3a &#8220;HH:MM:SS&#8221; %CPU (\u5b57\u6bb5 8)\uff1a\u8fdb\u7a0b\u5f53\u524d\u4f7f\u7528\u7684 CPU \u767e\u5206\u6bd4 %MEM (\u5b57\u6bb5 [&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-63883","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63883","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=63883"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63883\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}