{"id":85418,"date":"2026-07-27T14:08:56","date_gmt":"2026-07-27T06:08:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/85418.html"},"modified":"2026-07-27T14:08:56","modified_gmt":"2026-07-27T06:08:56","slug":"%e3%80%90linux%e4%bb%8e%e5%85%a5%e9%97%a8%e5%88%b0%e7%b2%be%e9%80%9a%e3%80%91%e7%ac%ac49%e7%af%87%ef%bc%9a%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%95%85%e9%9a%9c%e6%8e%92%e6%9f%a5%e7%bb%88%e6%9e%81%e6%8c%87","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/85418.html","title":{"rendered":"\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"-toc\" style=\"margin-left:40px\">\n<p id=\"%E4%B8%80%E3%80%81%E6%8E%92%E6%9F%A5%E6%A1%86%E6%9E%B6%EF%BC%9A%E6%8E%A5%E5%88%B0%E5%91%8A%E8%AD%A6%E5%90%8E%E7%AC%AC%E4%B8%80%E4%BB%B6%E4%BA%8B%E5%81%9A%E4%BB%80%E4%B9%88-toc\" style=\"margin-left:40px\">\u4e00\u3001\u6392\u67e5\u6846\u67b6&#xff1a;\u63a5\u5230\u544a\u8b66\u540e\u7b2c\u4e00\u4ef6\u4e8b\u505a\u4ec0\u4e48<\/p>\n<p id=\"1.1%20%E9%BB%84%E9%87%915%E5%88%86%E9%92%9F%EF%BC%9A%E5%BB%BA%E7%AB%8B%E5%85%A8%E5%B1%80%E8%AE%A4%E7%9F%A5-toc\" style=\"margin-left:80px\">1.1 \u9ec4\u91d15\u5206\u949f&#xff1a;\u5efa\u7acb\u5168\u5c40\u8ba4\u77e5<\/p>\n<p id=\"1.2%20%E5%BF%AB%E9%80%9F%E5%AE%9A%E4%BD%8D%E6%96%B9%E5%90%91%EF%BC%9A%E7%9C%8Bvmstat%E5%86%B3%E5%AE%9A%E4%B8%8B%E4%B8%80%E6%AD%A5-toc\" style=\"margin-left:80px\">1.2 \u5feb\u901f\u5b9a\u4f4d\u65b9\u5411&#xff1a;\u770bvmstat\u51b3\u5b9a\u4e0b\u4e00\u6b65<\/p>\n<p id=\"%E4%BA%8C%E3%80%81%E5%9C%BA%E6%99%AF%E4%B8%80%EF%BC%9ACPU%E9%A3%99%E5%8D%87100%25-toc\" style=\"margin-left:40px\">\u4e8c\u3001\u573a\u666f\u4e00&#xff1a;CPU\u98d9\u5347100%<\/p>\n<p id=\"2.1%20%E7%8E%B0%E8%B1%A1-toc\" style=\"margin-left:80px\">2.1 \u73b0\u8c61<\/p>\n<p id=\"2.2%20%E6%8E%92%E6%9F%A5%E6%B5%81%E7%A8%8B-toc\" style=\"margin-left:80px\">2.2 \u6392\u67e5\u6d41\u7a0b<\/p>\n<p id=\"2.3%20CPU%E6%8E%92%E6%9F%A5%E6%80%BB%E7%BB%93-toc\" style=\"margin-left:80px\">2.3 CPU\u6392\u67e5\u603b\u7ed3<\/p>\n<p id=\"%E4%B8%89%E3%80%81%E5%9C%BA%E6%99%AF%E4%BA%8C%EF%BC%9A%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F%E6%8E%92%E6%9F%A5-toc\" style=\"margin-left:40px\">\u4e09\u3001\u573a\u666f\u4e8c&#xff1a;\u5185\u5b58\u6cc4\u6f0f\u6392\u67e5<\/p>\n<p id=\"3.1%20%E7%8E%B0%E8%B1%A1-toc\" style=\"margin-left:80px\">3.1 \u73b0\u8c61<\/p>\n<p id=\"3.2%20%E6%8E%92%E6%9F%A5%E6%B5%81%E7%A8%8B-toc\" style=\"margin-left:80px\">3.2 \u6392\u67e5\u6d41\u7a0b<\/p>\n<p id=\"3.3%20%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F%E6%8E%92%E6%9F%A5%E6%80%BB%E7%BB%93-toc\" style=\"margin-left:80px\">3.3 \u5185\u5b58\u6cc4\u6f0f\u6392\u67e5\u603b\u7ed3<\/p>\n<p id=\"%E5%9B%9B%E3%80%81%E5%9C%BA%E6%99%AF%E4%B8%89%EF%BC%9A%E7%A3%81%E7%9B%98%E6%BB%A1%E4%BA%86%E4%BD%86%E6%89%BE%E4%B8%8D%E5%88%B0%E5%A4%A7%E6%96%87%E4%BB%B6-toc\" style=\"margin-left:40px\">\u56db\u3001\u573a\u666f\u4e09&#xff1a;\u78c1\u76d8\u6ee1\u4e86\u4f46\u627e\u4e0d\u5230\u5927\u6587\u4ef6<\/p>\n<p id=\"4.1%20%E7%8E%B0%E8%B1%A1-toc\" style=\"margin-left:80px\">4.1 \u73b0\u8c61<\/p>\n<p id=\"4.2%20%E6%8E%92%E6%9F%A5%E6%B5%81%E7%A8%8B-toc\" style=\"margin-left:80px\">4.2 \u6392\u67e5\u6d41\u7a0b<\/p>\n<p id=\"4.3%20%E7%A3%81%E7%9B%98%E6%8E%92%E6%9F%A5%E6%80%BB%E7%BB%93-toc\" style=\"margin-left:80px\">4.3 \u78c1\u76d8\u6392\u67e5\u603b\u7ed3<\/p>\n<p id=\"%E4%BA%94%E3%80%81%E7%BB%BC%E5%90%88%E6%8E%92%E6%9F%A5%E9%80%9F%E6%9F%A5%E8%A1%A8-toc\" style=\"margin-left:40px\">\u4e94\u3001\u7efc\u5408\u6392\u67e5\u901f\u67e5\u8868<\/p>\n<p id=\"%E5%85%AD%E3%80%81%E6%9C%AC%E7%AF%87%E5%B0%8F%E7%BB%93-toc\" style=\"margin-left:40px\">\u516d\u3001\u672c\u7bc7\u5c0f\u7ed3<\/p>\n<p id=\"%E5%8A%A8%E6%89%8B%E7%BB%83%E4%B9%A0-toc\" style=\"margin-left:80px\">\u52a8\u624b\u7ec3\u4e60<\/p>\n<p id=\"%E4%B8%83%E3%80%81%E4%B8%8B%E7%AF%87%E9%A2%84%E5%91%8A-toc\" style=\"margin-left:40px\">\u4e03\u3001\u4e0b\u7bc7\u9884\u544a<\/p>\n<hr id=\"hr-toc\" \/>\n<h3 id=\"%E4%B8%80%E3%80%81%E6%8E%92%E6%9F%A5%E6%A1%86%E6%9E%B6%EF%BC%9A%E6%8E%A5%E5%88%B0%E5%91%8A%E8%AD%A6%E5%90%8E%E7%AC%AC%E4%B8%80%E4%BB%B6%E4%BA%8B%E5%81%9A%E4%BB%80%E4%B9%88\">\u4e00\u3001\u6392\u67e5\u6846\u67b6&#xff1a;\u63a5\u5230\u544a\u8b66\u540e\u7b2c\u4e00\u4ef6\u4e8b\u505a\u4ec0\u4e48<\/h3>\n<h4 id=\"1.1%20%E9%BB%84%E9%87%915%E5%88%86%E9%92%9F%EF%BC%9A%E5%BB%BA%E7%AB%8B%E5%85%A8%E5%B1%80%E8%AE%A4%E7%9F%A5\">1.1 \u9ec4\u91d15\u5206\u949f&#xff1a;\u5efa\u7acb\u5168\u5c40\u8ba4\u77e5<\/h4>\n<p>\u534a\u591c\u88ab\u62a5\u8b66\u53eb\u9192&#xff0c;\u4f60\u6700\u4e0d\u8be5\u505a\u7684\u5c31\u662f\u968f\u673a\u6572\u547d\u4ee4\u4e71\u8bd5\u3002\u6ca1\u6709\u660e\u786e\u65b9\u5411\u7684\u6392\u67e5&#xff0c;\u53ea\u4f1a\u6d6a\u8d39\u5b9d\u8d35\u7684\u6062\u590d\u65f6\u95f4\u3002\u524d5\u5206\u949f&#xff0c;\u53ea\u505a\u4e00\u4ef6\u4e8b&#xff1a;\u5efa\u7acb\u5168\u5c40\u8ba4\u77e5&#xff0c;\u9501\u5b9a\u95ee\u9898\u8303\u56f4\u3002<\/p>\n<p>\u6807\u51c6\u6d41\u7a0b\u53ea\u6709\u4e94\u6761\u547d\u4ee4&#xff1a;<\/p>\n<p>bash<\/p>\n<p># 1. \u7cfb\u7edf\u6574\u4f53\u8d1f\u8f7d&#xff08;1\u5206\u949f\/5\u5206\u949f\/15\u5206\u949f\u5e73\u5747\u8d1f\u8f7d&#xff09;<br \/>\nuptime<\/p>\n<p># 2. \u5185\u5b58\u6982\u51b5&#xff08;available\u662f\u6700\u5173\u952e\u7684\u6307\u6807&#xff09;<br \/>\nfree -h<\/p>\n<p># 3. \u78c1\u76d8\u7a7a\u95f4&#xff08;\u6ee1\u4e86\u4ec0\u4e48\u90fd\u505a\u4e0d\u4e86&#xff09;<br \/>\ndf -h<\/p>\n<p># 4. \u7cfb\u7edf\u6574\u4f53\u8d1f\u8f7d\u5206\u89e3&#xff08;r&#061;CPU&#xff0c;b&#061;I\/O&#xff0c;wa&#061;\u7b49\u5f85I\/O&#xff09;<br \/>\nvmstat 2 5<\/p>\n<p># 5. \u6700\u8fd1\u7684\u7cfb\u7edf\u65e5\u5fd7&#xff08;\u5185\u6838\u3001\u670d\u52a1\u3001OOM\u7b49\u5f02\u5e38&#xff09;<br \/>\njournalctl -p err &#8211;since &#034;30 min ago&#034; <\/p>\n<p>\u505a\u5b8c\u8fd9\u4e94\u6761&#xff0c;\u56de\u7b54\u81ea\u5df1\u4e09\u4e2a\u95ee\u9898&#xff1a;<\/p>\n<li>\n<p>\u8d1f\u8f7d\u9ad8\u5417&#xff1f;&#xff08;uptime\u00a0vs CPU\u6838\u5fc3\u6570&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u8d1f\u8f7d\u662f\u54ea\u6765\u7684&#xff1f;&#xff08;vmstat\u7684r\u5217\u8fd8\u662fb\u5217\u9ad8&#xff1f;wa\u6709\u591a\u9ad8&#xff1f;&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u6700\u8fd1\u6709\u4ec0\u4e48\u5f02\u5e38\u4e8b\u4ef6&#xff1f;&#xff08;OOM Killer&#xff1f;\u670d\u52a1\u91cd\u542f&#xff1f;\u78c1\u76d8\u9519\u8bef&#xff1f;&#xff09;<\/p>\n<\/li>\n<h4 id=\"1.2%20%E5%BF%AB%E9%80%9F%E5%AE%9A%E4%BD%8D%E6%96%B9%E5%90%91%EF%BC%9A%E7%9C%8Bvmstat%E5%86%B3%E5%AE%9A%E4%B8%8B%E4%B8%80%E6%AD%A5\">1.2 \u5feb\u901f\u5b9a\u4f4d\u65b9\u5411&#xff1a;\u770bvmstat\u51b3\u5b9a\u4e0b\u4e00\u6b65<\/h4>\n<p>text<\/p>\n<p>vmstat 2<br \/>\n    \u2502<br \/>\n    \u251c\u2500\u2500 r \u5217\u6301\u7eed &gt; CPU\u6838\u5fc3\u6570 \u2500\u2500\u2192 CPU\u74f6\u9888<br \/>\n    \u2502<br \/>\n    \u251c\u2500\u2500 b \u5217\u6301\u7eed &gt; 0          \u2500\u2500\u2192 I\/O\u74f6\u9888<br \/>\n    \u2502<br \/>\n    \u251c\u2500\u2500 si\/so \u6301\u7eed &gt; 0        \u2500\u2500\u2192 \u5185\u5b58\u74f6\u9888&#xff08;\u6b63\u5728\u6362\u9875&#xff09;<br \/>\n    \u2502<br \/>\n    \u2514\u2500\u2500 \u4e09\u8005\u90fd\u6b63\u5e38            \u2500\u2500\u2192 \u7f51\u7edc\u6216\u5e94\u7528\u5c42\u95ee\u9898 <\/p>\n<p>\u8fd94\u4e2a\u5224\u65ad\u8db3\u591f\u8986\u76d690%\u7684\u751f\u4ea7\u6545\u969c\u3002\u00a0\u65b9\u5411\u9519\u4e86&#xff0c;\u540e\u9762\u7684\u6240\u6709\u6392\u67e5\u90fd\u662f\u6d6a\u8d39\u65f6\u95f4\u3002\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u6309\u4e09\u79cd\u6700\u7ecf\u5178\u7684\u6545\u969c\u573a\u666f&#xff0c;\u9010\u4e00\u5c55\u5f00\u5b8c\u6574\u7684\u6392\u67e5\u6d41\u7a0b\u3002<\/p>\n<h3 id=\"%E4%BA%8C%E3%80%81%E5%9C%BA%E6%99%AF%E4%B8%80%EF%BC%9ACPU%E9%A3%99%E5%8D%87100%25\">\u4e8c\u3001\u573a\u666f\u4e00&#xff1a;CPU\u98d9\u5347100%<\/h3>\n<h4 id=\"2.1%20%E7%8E%B0%E8%B1%A1\">2.1 \u73b0\u8c61<\/h4>\n<p>\u76d1\u63a7\u544a\u8b66&#xff1a;\u67d0\u53f0\u670d\u52a1\u5668\u7684CPU\u4f7f\u7528\u7387\u7a81\u7136\u98d9\u5347\u5230100%&#xff0c;\u4e14vmstat\u786e\u8ba4r\u5217\u8fdc\u5927\u4e8eCPU\u6838\u5fc3\u6570\u3002<\/p>\n<h4 id=\"2.2%20%E6%8E%92%E6%9F%A5%E6%B5%81%E7%A8%8B\">2.2 \u6392\u67e5\u6d41\u7a0b<\/h4>\n<p>\u7b2c\u4e00\u6b65&#xff1a;\u627e\u51fa\u5403CPU\u7684\u8fdb\u7a0b<\/p>\n<p>bash<\/p>\n<p>top -c<br \/>\n# \u6309 P \u786e\u4fdd\u6309CPU\u6392\u5e8f<br \/>\n# \u8bb0\u4e0b\u6392\u5728\u6700\u524d\u9762\u7684PID\u548c\u8fdb\u7a0b\u540d <\/p>\n<p>\u5047\u8bbePID\u4e3a12345&#xff0c;\u8fdb\u7a0b\u540d\u662fjava&#xff08;\u67d0\u4e2aJava\u5e94\u7528&#xff09;\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u7ec6\u5316\u5230\u7ebf\u7a0b\u7ea7\u522b<\/p>\n<p>\u5bf9\u4e8e\u591a\u7ebf\u7a0b\u5e94\u7528&#xff08;Java\u3001MySQL&#xff09;&#xff0c;\u4e00\u4e2a\u8fdb\u7a0b\u7684CPU\u9ad8\u901a\u5e38\u662f\u67d0\u51e0\u4e2a\u7ebf\u7a0b\u5bfc\u81f4\u7684&#xff1a;<\/p>\n<p>bash<\/p>\n<p># \u67e5\u770b\u8fdb\u7a0b\u5185\u6bcf\u4e2a\u7ebf\u7a0b\u7684CPU\u4f7f\u7528\u7387<br \/>\ntop -H -p 12345<br \/>\n# \u8bb0\u4e0b\u6700\u9ad8CPU\u7684\u7ebf\u7a0bID&#xff08;TID&#xff09;&#xff0c;\u5047\u8bbe\u4e3a 12389 <\/p>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u5c06\u7ebf\u7a0bID\u8f6c\u5341\u516d\u8fdb\u5236<\/p>\n<p>bash<\/p>\n<p>printf &#034;%x\\\\n&#034; 12389<br \/>\n# \u8f93\u51fa&#xff1a;3065 <\/p>\n<p>\u7b2c\u56db\u6b65&#xff1a;\u67e5\u770b\u8be5\u7ebf\u7a0b\u7684\u8c03\u7528\u6808<\/p>\n<p>bash<\/p>\n<p># jstack\u662fJava\u4e13\u7528\u5de5\u5177&#xff0c;\u8f93\u51fa\u8fdb\u7a0b\u5185\u6240\u6709\u7ebf\u7a0b\u7684\u8c03\u7528\u6808<br \/>\n# \u7528\u5341\u516d\u8fdb\u5236TID&#xff08;3065&#xff09;\u641c\u7d22\u5bf9\u5e94\u7684\u7ebf\u7a0b<br \/>\njstack 12345 | grep -A 20 3065<\/p>\n<p># \u5982\u679c\u662f\u5176\u4ed6\u5e94\u7528&#xff08;\u975eJava&#xff09;&#xff0c;\u7528&#096;perf&#096;\u91c7\u6837CPU\u8c03\u7528\u6808<br \/>\nsudo perf top -p 12345 <\/p>\n<p>\u8f93\u51fa\u4f1a\u663e\u793a\u7ebf\u7a0b\u5f53\u524d\u6b63\u5728\u6267\u884c\u7684\u51fd\u6570\u540d\u3002\u4ece\u8c03\u7528\u6808\u4e2d\u7684\u51fd\u6570\u540d\u53ef\u4ee5\u5224\u65ad&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u9891\u7e41GC&#xff08;\u5783\u573e\u56de\u6536&#xff09;\u2192 \u5185\u5b58\u4e0d\u591f&#xff0c;\u68c0\u67e5\u5806\u5927\u5c0f\u6216\u6392\u67e5\u5185\u5b58\u6cc4\u6f0f<\/p>\n<\/li>\n<li>\n<p>\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d \u2192 \u53ef\u80fd\u662f\u6b63\u5219\u56de\u6eaf\u95ee\u9898\u6216\u6076\u610f\u8f93\u5165<\/p>\n<\/li>\n<li>\n<p>\u4e1a\u52a1\u4ee3\u7801\u7684\u6b7b\u5faa\u73af \u2192 \u4ee3\u7801\u903b\u8f91bug<\/p>\n<\/li>\n<li>\n<p>\u52a0\u5bc6\/\u538b\u7f29\u7b49\u8ba1\u7b97\u5bc6\u96c6\u51fd\u6570 \u2192 \u6b63\u5e38\u7684\u8ba1\u7b97\u4efb\u52a1&#xff0c;\u8003\u8651\u4f18\u5316\u7b97\u6cd5\u6216\u9650\u6d41<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"2.3%20CPU%E6%8E%92%E6%9F%A5%E6%80%BB%E7%BB%93\">2.3 CPU\u6392\u67e5\u603b\u7ed3<\/h4>\n<p>text<\/p>\n<p>top \u2192 \u627e\u9ad8CPU\u8fdb\u7a0b<br \/>\ntop -H -p PID \u2192 \u627e\u9ad8CPU\u7ebf\u7a0b&#xff08;\u591a\u7ebf\u7a0b\u5e94\u7528&#xff09;<br \/>\njstack\/perf top \u2192 \u770b\u8c03\u7528\u6808\u627e\u6839\u56e0 <\/p>\n<p>\u4e09\u79cd\u5e38\u89c1\u6839\u56e0&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u6b7b\u5faa\u73af&#xff1a;\u4e1a\u52a1\u4ee3\u7801bug<\/p>\n<\/li>\n<li>\n<p>\u9891\u7e41GC&#xff1a;\u5185\u5b58\u4e0d\u8db3\u6216\u5185\u5b58\u6cc4\u6f0f\u5bfc\u81f4<\/p>\n<\/li>\n<li>\n<p>\u6b63\u5e38\u8ba1\u7b97\u5bc6\u96c6&#xff1a;\u52a0\u5bc6\/\u538b\u7f29\/\u8f6c\u7801\u7b49&#xff0c;\u8003\u8651\u52a0CPU\u6216\u9650\u6d41<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"%E4%B8%89%E3%80%81%E5%9C%BA%E6%99%AF%E4%BA%8C%EF%BC%9A%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F%E6%8E%92%E6%9F%A5\">\u4e09\u3001\u573a\u666f\u4e8c&#xff1a;\u5185\u5b58\u6cc4\u6f0f\u6392\u67e5<\/h3>\n<h4 id=\"3.1%20%E7%8E%B0%E8%B1%A1\">3.1 \u73b0\u8c61<\/h4>\n<p>\u670d\u52a1\u5668\u5185\u5b58\u4f7f\u7528\u7387\u6301\u7eed\u589e\u957f&#xff0c;\u5373\u4f7f\u4e1a\u52a1\u4f4e\u8c37\u671f\u4e5f\u4e0d\u4e0b\u964d\u3002\u91cd\u542f\u540e\u6062\u590d\u6b63\u5e38&#xff0c;\u4f46\u8fd0\u884c\u51e0\u5929\u540e\u53c8\u6da8\u56de\u53bb\u3002\u8fd9\u662f\u5178\u578b\u7684\u5185\u5b58\u6cc4\u6f0f\u7279\u5f81\u3002<\/p>\n<h4 id=\"3.2%20%E6%8E%92%E6%9F%A5%E6%B5%81%E7%A8%8B\">3.2 \u6392\u67e5\u6d41\u7a0b<\/h4>\n<p>\u7b2c\u4e00\u6b65&#xff1a;\u786e\u8ba4\u5185\u5b58\u5206\u5e03<\/p>\n<p>bash<\/p>\n<p>free -h<br \/>\n# available\u6301\u7eed\u51cf\u5c11&#xff0c;buff\/cache\u6ca1\u6709\u589e\u52a0 \u2192 \u533f\u540d\u9875&#xff08;\u7a0b\u5e8f\u5806\/\u6808&#xff09;\u5728\u589e\u957f <\/p>\n<p>buff\/cache\u662f\u6587\u4ef6\u7f13\u5b58&#xff0c;\u6da8\u4e86\u4e0d\u610f\u5473\u7740\u6cc4\u6f0f\u3002\u5982\u679cused\u4e0d\u65ad\u589e\u52a0\u800cbuff\/cache\u57fa\u672c\u4e0d\u53d8&#xff0c;\u8bf4\u660e\u5e94\u7528\u5728\u6301\u7eed\u7533\u8bf7\u533f\u540d\u5185\u5b58\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u627e\u51fa\u5185\u5b58\u5927\u6237<\/p>\n<p>bash<\/p>\n<p>ps aux &#8211;sort&#061;-%mem | head -10<br \/>\n# \u6216\u8005\u7528\u66f4\u7cbe\u786e\u7684PSS\u7edf\u8ba1<br \/>\nsudo smem -p -s pss | head -10 <\/p>\n<p>\u5047\u8bbePID\u4e3a12345\u7684\u8fdb\u7a0b\u5185\u5b58\u5360\u7528\u4e0d\u505c\u589e\u957f\u3002smem\u7684PSS&#xff08;Proportional Set Size&#xff0c;\u6bd4\u4f8b\u5171\u4eab\u5927\u5c0f&#xff09;\u6bd4RSS\u66f4\u51c6\u786e&#xff0c;\u56e0\u4e3a\u5b83\u628a\u5171\u4eab\u5e93\u7684\u5185\u5b58\u6309\u6bd4\u4f8b\u5206\u644a\u7ed9\u4e86\u5404\u4e2a\u4f7f\u7528\u5b83\u7684\u8fdb\u7a0b\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u67e5\u770b\u8be5\u8fdb\u7a0b\u7684\u5185\u5b58\u589e\u957f\u8d8b\u52bf<\/p>\n<p>bash<\/p>\n<p># \u6bcf10\u79d2\u6253\u5370\u4e00\u6b21\u5185\u5b58\u4f7f\u7528&#xff0c;\u6301\u7eed\u89c2\u5bdf<br \/>\nwhile true; do<br \/>\n    echo &#034;$(date &#043;%H:%M:%S) $(smem -p -c &#034;pid pss&#034; -P 12345 | tail -1)&#034;<br \/>\n    sleep 10<br \/>\ndone <\/p>\n<p>\u5982\u679cPSS\u6301\u7eed\u589e\u957f \u2192 \u786e\u8ba4\u6cc4\u6f0f\u5b58\u5728\u4e8e\u8be5\u8fdb\u7a0b\u4e2d\u3002<\/p>\n<p>\u7b2c\u56db\u6b65&#xff1a;\u67e5\u770b\u8fdb\u7a0b\u5185\u5b58\u5206\u914d\u7ec6\u8282<\/p>\n<p>bash<\/p>\n<p>pmap -x 12345 | tail -1<br \/>\n# \u6216\u8005<br \/>\ncat \/proc\/12345\/status | grep -E &#034;VmRSS|VmSize&#034; <\/p>\n<p>pmap\u663e\u793a\u8be5\u8fdb\u7a0b\u7684\u865a\u62df\u5185\u5b58\u6620\u5c04\u2014\u2014\u6bcf\u4e00\u6bb5\u5185\u5b58\u7684\u8d77\u59cb\u5730\u5740\u3001\u6743\u9650\u3001\u5927\u5c0f\u548c\u6765\u6e90&#xff08;\u6620\u5c04\u7684\u662f\u54ea\u4e2a\u6587\u4ef6\u8fd8\u662f\u533f\u540d\u5206\u914d&#xff09;\u3002\u5982\u679c\u67d0\u6bb5\u533f\u540d\u5185\u5b58&#xff08;anon&#xff09;\u5f02\u5e38\u5927&#xff08;\u6bd4\u5982\u5360\u603b\u5185\u5b58\u768480%\u4ee5\u4e0a&#xff09;&#xff0c;\u53ef\u4ee5\u57fa\u672c\u786e\u8ba4\u662f\u7a0b\u5e8f\u5185\u90e8\u5728\u6301\u7eed\u7533\u8bf7\u5185\u5b58\u800c\u4e0d\u91ca\u653e\u3002<\/p>\n<p>\u7b2c\u4e94\u6b65&#xff1a;\u4f7f\u7528valgrind\u6df1\u5165\u5206\u6790&#xff08;\u5f00\u53d1\u73af\u5883&#xff09;<\/p>\n<p>bash<\/p>\n<p># Valgrind\u7684memcheck\u5de5\u5177\u4f1a\u6a21\u62df\u6267\u884c\u7a0b\u5e8f&#xff0c;\u8ffd\u8e2a\u6bcf\u4e00\u5757\u5185\u5b58\u7684\u5206\u914d\u548c\u91ca\u653e<br \/>\n# \u6ce8\u610f&#xff1a;\u8fd9\u4f1a\u4f7f\u7a0b\u5e8f\u8fd0\u884c\u901f\u5ea6\u51cf\u616210-20\u500d&#xff0c;\u53ea\u80fd\u5728\u5f00\u53d1\u73af\u5883\u4f7f\u7528&#xff01;<br \/>\nvalgrind &#8211;leak-check&#061;full &#8211;log-file&#061;valgrind.log .\/my_app<br \/>\ncat valgrind.log | grep &#034;definitely lost&#034; <\/p>\n<p>\u8f93\u51fa\u4f1a\u7cbe\u786e\u6307\u51fa\u4ee3\u7801\u4e2d\u54ea\u4e2a\u6587\u4ef6\u3001\u54ea\u4e00\u884c\u5206\u914d\u7684\u54ea\u5757\u5185\u5b58\u6ca1\u6709\u88ab\u91ca\u653e\u3002\u8fd9\u4e2a\u4fe1\u606f\u4ea4\u7ed9\u5f00\u53d1\u4eba\u5458&#xff0c;\u53ef\u4ee5\u7cbe\u786e\u5b9a\u4f4d\u6cc4\u6f0f\u70b9\u3002<\/p>\n<h4 id=\"3.3%20%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F%E6%8E%92%E6%9F%A5%E6%80%BB%E7%BB%93\">3.3 \u5185\u5b58\u6cc4\u6f0f\u6392\u67e5\u603b\u7ed3<\/h4>\n<p>text<\/p>\n<p>free -h \u2192 \u786e\u8ba4\u5185\u5b58\u589e\u957f\u7c7b\u578b<br \/>\nps\/smem \u2192 \u627e\u5230\u5185\u5b58\u589e\u957f\u8fdb\u7a0b<br \/>\npmap\/proc\/PID\/status \u2192 \u786e\u8ba4\u8fdb\u7a0b\u4e2d\u54ea\u90e8\u5206\u5185\u5b58\u5f02\u5e38&#xff08;\u533f\u540d\u9875\u8fd8\u662f\u5171\u4eab\u5185\u5b58&#xff09;<br \/>\nvalgrind&#xff08;\u5f00\u53d1\u73af\u5883&#xff09;\u2192 \u5b9a\u4f4d\u5230\u5177\u4f53\u4ee3\u7801\u884c <\/p>\n<p>\u5e38\u89c1\u6839\u56e0&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5e94\u7528\u4ee3\u7801bug&#xff1a;\u5fd8\u8bb0\u91ca\u653e\u5185\u5b58\u3001\u5faa\u73af\u4e2d\u53cd\u590d\u5206\u914d<\/p>\n<\/li>\n<li>\n<p>\u7f13\u5b58\u672a\u8bbe\u4e0a\u9650&#xff1a;\u8fdb\u7a0b\u5185\u7f13\u5b58&#xff08;\u5982HashMap&#xff09;\u65e0\u9650\u589e\u957f<\/p>\n<\/li>\n<li>\n<p>\u7ebf\u7a0b\u6cc4\u6f0f&#xff1a;\u7ebf\u7a0b\u521b\u5efa\u540e\u672a\u6b63\u786e\u56de\u6536&#xff0c;\u6bcf\u4e2a\u7ebf\u7a0b\u9ed8\u8ba4\u5360\u7528\u7ea68MB\u6808\u7a7a\u95f4<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"%E5%9B%9B%E3%80%81%E5%9C%BA%E6%99%AF%E4%B8%89%EF%BC%9A%E7%A3%81%E7%9B%98%E6%BB%A1%E4%BA%86%E4%BD%86%E6%89%BE%E4%B8%8D%E5%88%B0%E5%A4%A7%E6%96%87%E4%BB%B6\">\u56db\u3001\u573a\u666f\u4e09&#xff1a;\u78c1\u76d8\u6ee1\u4e86\u4f46\u627e\u4e0d\u5230\u5927\u6587\u4ef6<\/h3>\n<h4 id=\"4.1%20%E7%8E%B0%E8%B1%A1\">4.1 \u73b0\u8c61<\/h4>\n<p>df -h\u62a5\u544a\u78c1\u76d8\u4f7f\u7528\u738790%\u4ee5\u4e0a&#xff0c;\u4f46\u7528du -sh \/*\u9010\u5c42\u6392\u67e5&#xff0c;\u6240\u6709\u76ee\u5f55\u52a0\u8d77\u6765\u7684\u5927\u5c0f\u8fdc\u5c0f\u4e8edf\u663e\u793a\u7684\u5df2\u7528\u7a7a\u95f4\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48df\u548cdu\u7ed3\u679c\u5bf9\u4e0d\u4e0a&#xff1f;<\/p>\n<ul>\n<li>\n<p>df\u662f\u4ece\u6587\u4ef6\u7cfb\u7edf\u5143\u6570\u636e\u4e2d\u76f4\u63a5\u8bfb\u53d6\u7684\u5757\u4f7f\u7528\u91cf&#xff0c;\u53cd\u6620\u7684\u662f\u78c1\u76d8\u5757\u5206\u914d\u60c5\u51b5<\/p>\n<\/li>\n<li>\n<p>du\u662f\u904d\u5386\u76ee\u5f55\u6811&#xff0c;\u628a\u6bcf\u4e2a\u53ef\u89c1\u6587\u4ef6\u7684\u5927\u5c0f\u7d2f\u52a0\u8d77\u6765<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u6709\u6587\u4ef6\u88ab\u5220\u9664\u4e86\u4f46\u8fdb\u7a0b\u8fd8\u6301\u6709\u5b83\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff0c;du\u7edf\u8ba1\u4e0d\u5230&#xff0c;\u4f46df\u77e5\u9053\u8fd9\u4e9b\u78c1\u76d8\u5757\u6ca1\u6709\u88ab\u91ca\u653e<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"4.2%20%E6%8E%92%E6%9F%A5%E6%B5%81%E7%A8%8B\">4.2 \u6392\u67e5\u6d41\u7a0b<\/h4>\n<p>\u7b2c\u4e00\u6b65&#xff1a;\u786e\u8ba4df\u548cdu\u7684\u5dee\u5f02<\/p>\n<p>bash<\/p>\n<p>df -h \/<br \/>\ndu -sh \/ 2&gt;\/dev\/null<br \/>\n# \u5982\u679cdf\u663e\u793a40G\u5df2\u7528&#xff0c;du\u663e\u793a30G&#xff0c;\u4f46\u52a0\u8d77\u6765\u786e\u5b9e\u627e\u4e0d\u5230\u540e10G\u5728\u54ea <\/p>\n<p>\u8fd9\u79cd\u60ac\u6b8a\u5dee\u5f02&#xff08;\u5dee\u4e86\u51e0\u4e2aGB\u800c\u76ee\u5f55\u904d\u5386\u5b8c\u5168\u627e\u4e0d\u5230\u5bf9\u5e94\u6587\u4ef6&#xff09;&#xff0c;\u8bf4\u660e\u6709\u88ab\u5220\u9664\u4f46\u4ecd\u5728\u88ab\u8fdb\u7a0b\u6301\u6709\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u627e\u51fa\u201c\u5df2\u5220\u9664\u4f46\u4ecd\u88ab\u5360\u7528\u7684\u6587\u4ef6\u201d<\/p>\n<p>bash<\/p>\n<p>sudo lsof | grep deleted | awk &#039;{print $1, $2, $NF}&#039; | sort -u<br \/>\n# \u6216\u8005\u66f4\u7cbe\u786e\u5730\u663e\u793a\u6587\u4ef6\u5927\u5c0f<br \/>\nsudo lsof &#043;L1 <\/p>\n<p>&#043;L1\u662flsof\u7684\u4e13\u7528\u53c2\u6570&#xff0c;\u8868\u793a\u201c\u5217\u51fa\u6240\u6709\u94fe\u63a5\u8ba1\u6570\u5c0f\u4e8e1\u7684\u6587\u4ef6\u201d&#xff0c;\u5373\u88ab\u5220\u9664\u4f46\u8fdb\u7a0b\u4ecd\u6253\u5f00\u7740\u7684\u6587\u4ef6\u3002\u8f93\u51fa\u793a\u4f8b&#xff1a;<\/p>\n<p>text<\/p>\n<p>COMMAND   PID   USER   FD   TYPE DEVICE SIZE\/OFF NLINK NODE NAME<br \/>\njava      12345 app    12w  REG  253,1   8589934592  0  56789 \/var\/log\/app.log (deleted) <\/p>\n<p>\u8fd9\u6761\u8f93\u51fa\u663e\u793a&#xff1a;\u8fdb\u7a0bjava&#xff08;PID 12345&#xff09;\u7684\u6587\u4ef6\u63cf\u8ff0\u7b2612w&#xff0c;\u6307\u5411\u4e00\u4e2a\u5df2\u88ab\u5220\u9664\u7684\u6587\u4ef6\/var\/log\/app.log&#xff0c;\u5b83\u5360\u7528\u4e868.5GB\u7684\u78c1\u76d8\u7a7a\u95f4\u3002\u90a3\u4e2a\u201c(deleted)\u201d\u6807\u8bb0\u5c31\u662f\u7f6a\u9b41\u7978\u9996\u2014\u2014\u6587\u4ef6\u5df2\u4e0d\u5728\u76ee\u5f55\u4e2d&#xff0c;\u4f46\u5185\u6838\u56e0\u4e3a\u8fdb\u7a0b\u8fd8\u6253\u5f00\u7740\u5b83&#xff0c;\u4e0d\u4f1a\u91ca\u653e\u5b83\u7684\u78c1\u76d8\u5757\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u91ca\u653e\u7a7a\u95f4<\/p>\n<p>bash<\/p>\n<p># \u5982\u679c\u662f\u65e5\u5fd7\u6587\u4ef6&#xff0c;\u76f4\u63a5\u6e05\u7a7a<br \/>\nsudo truncate -s 0 \/proc\/12345\/fd\/12<\/p>\n<p># \u6216\u8005\u8ba9\u8fdb\u7a0b\u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6&#xff08;\u66f4\u4f18\u96c5&#xff0c;\u9700\u8981\u8fdb\u7a0b\u652f\u6301&#xff09;<br \/>\nkill -HUP 12345   # \u53d1\u9001SIGHUP&#xff0c;\u8bb8\u591a\u5b88\u62a4\u8fdb\u7a0b\u4f1a\u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6<\/p>\n<p># \u5982\u679c\u4e0d\u5173\u5fc3\u8fd9\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9&#xff0c;\u76f4\u63a5\u6740\u6389\u8fdb\u7a0b<br \/>\nsudo kill 12345 <\/p>\n<p>truncate\u00a0vs\u00a0kill&#xff1a;truncate -s 0\u901a\u8fc7\/proc\/PID\/fd\/\u6587\u4ef6\u63cf\u8ff0\u7b26\u6765\u622a\u65ad\u6587\u4ef6\u5185\u5bb9&#xff0c;\u8fdb\u7a0b\u65e0\u611f\u77e5&#xff0c;\u4e0d\u4f1a\u4e2d\u65ad\u670d\u52a1\u3002kill\u4f1a\u7ec8\u6b62\u8fdb\u7a0b&#xff0c;\u5982\u679c\u8fd9\u4e2a\u8fdb\u7a0b\u662f\u5173\u952e\u670d\u52a1&#xff0c;\u53ef\u80fd\u9020\u6210\u5b95\u673a\u3002\u56e0\u6b64\u4f18\u5148\u7528truncate\u3002<\/p>\n<h4 id=\"4.3%20%E7%A3%81%E7%9B%98%E6%8E%92%E6%9F%A5%E6%80%BB%E7%BB%93\">4.3 \u78c1\u76d8\u6392\u67e5\u603b\u7ed3<\/h4>\n<p>text<\/p>\n<p>df -h \u2192 \u786e\u8ba4\u5206\u533a\u5df2\u7528\u7a7a\u95f4<br \/>\ndu -sh \/* \u2192 \u627e\u5230\u7a7a\u95f4\u5360\u7528\u5927\u7684\u76ee\u5f55<br \/>\ndf\u548cdu\u7ed3\u679c\u60ac\u6b8a \u2192 \u88ab\u5220\u9664\u6587\u4ef6\u4ecd\u88ab\u5360\u7528&#xff08;lsof &#043;L1&#xff09;<br \/>\nlsof &#043;L1 \u2192 \u627e\u5230\u8fdb\u7a0b\u548c\u6587\u4ef6\u63cf\u8ff0\u7b26<br \/>\ntruncate -s 0 \/proc\/PID\/fd\/FD \u2192 \u91ca\u653e\u7a7a\u95f4 <\/p>\n<p>\u5e38\u89c1\u6839\u56e0&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u65e5\u5fd7\u8f6e\u66ff\u4e0d\u5f53&#xff1a;\u5e94\u7528\u5728\u6301\u7eed\u5199\u5165&#xff0c;logrotate\u811a\u672c\u7528rm\u5220\u4e86\u6587\u4ef6\u4f46\u6ca1\u6709\u7528kill -HUP\u901a\u77e5\u5e94\u7528\u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u53e5\u67c4\u3002\u6587\u4ef6\u867d\u5220&#xff0c;\u6570\u636e\u7ee7\u7eed\u5f80\u5185\u6838\u7684\u65e7inode\u91cc\u5199<\/p>\n<\/li>\n<li>\n<p>\u4e34\u65f6\u6587\u4ef6\u672a\u6e05\u7406&#xff1a;\u5e94\u7528\u521b\u5efa\u7684\u4e34\u65f6\u6587\u4ef6\u88ab\u5220\u9664&#xff0c;\u4f46\u53e5\u67c4\u672a\u5173\u95ed<\/p>\n<\/li>\n<li>\n<p>\u5927\u6587\u4ef6\u4ecd\u88ab\u8fdb\u7a0b\u6301\u6709&#xff1a;\u6709\u4ebarm\u4e86\u4e00\u4e2a\u5927\u6587\u4ef6\u4f46\u4e0d\u77e5\u9053\u6709\u8fdb\u7a0b\u8fd8\u5728\u7528\u5b83<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"%E4%BA%94%E3%80%81%E7%BB%BC%E5%90%88%E6%8E%92%E6%9F%A5%E9%80%9F%E6%9F%A5%E8%A1%A8\">\u4e94\u3001\u7efc\u5408\u6392\u67e5\u901f\u67e5\u8868<\/h3>\n<table>\n<tr>\u73b0\u8c61\u7b2c\u4e00\u6b65\u547d\u4ee4\u7b2c\u4e8c\u6b65\u547d\u4ee4\u5173\u952e\u5224\u65ad<\/tr>\n<tbody>\n<tr>\n<td>\u8d1f\u8f7d\u9ad8<\/td>\n<td>uptime\u00a0&#043;\u00a0vmstat 2<\/td>\n<td>r\u9ad8\u2192\u7b2c\u4e09\u5217&#xff0c;b\u9ad8\u2192\u7b2c\u56db\u5217<\/td>\n<td>r&gt;CPU\u6838\u6570&#061;CPU\u74f6\u9888&#xff0c;b&gt;0&#061;I\/O\u74f6\u9888<\/td>\n<\/tr>\n<tr>\n<td>CPU\u9ad8<\/td>\n<td>top -c<\/td>\n<td>top -H -p PID\u00a0&#043;\u00a0jstack\/perf top<\/td>\n<td>\u627e\u5403CPU\u7684\u7ebf\u7a0b\u548c\u8c03\u7528\u6808<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u9ad8<\/td>\n<td>free -h<\/td>\n<td>smem -p -s pss<\/td>\n<td>available\u6301\u7eed\u4e0b\u964d&#061;\u5185\u5b58\u4e0d\u8db3<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u6cc4\u6f0f<\/td>\n<td>smem\u89c2\u5bdf\u8d8b\u52bf<\/td>\n<td>pmap -x PID\u00a0&#043;\u00a0valgrind<\/td>\n<td>\u8fdb\u7a0bPSS\u53ea\u6da8\u4e0d\u8dcc&#061;\u6cc4\u6f0f<\/td>\n<\/tr>\n<tr>\n<td>\u78c1\u76d8\u6ee1<\/td>\n<td>df -h<\/td>\n<td>du -sh \/* 2&gt;\/dev\/null\u00a0\u9010\u5c42\u6df1\u5165<\/td>\n<td>df\u548cdu\u7ed3\u679c\u60ac\u6b8a&#061;\u88ab\u5220\u6587\u4ef6\u4ecd\u88ab\u5360\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u78c1\u76d8\u6ee1&#xff08;\u9690\u5f62&#xff09;<\/td>\n<td>df -h\u00a0vs\u00a0du -sh<\/td>\n<td>lsof &#043;L1<\/td>\n<td>\u67e5(deleted)\u6587\u4ef6\u5e76\u6e05\u7a7a\u6216kill -HUP<\/td>\n<\/tr>\n<tr>\n<td>\u7f51\u7edc\u5f02\u5e38<\/td>\n<td>ping -c 4 \u7f51\u5173<\/td>\n<td>ss -tanp<\/td>\n<td>\u786e\u8ba4\u8fde\u901a\u6027\u548c\u7aef\u53e3\u72b6\u6001<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"%E5%85%AD%E3%80%81%E6%9C%AC%E7%AF%87%E5%B0%8F%E7%BB%93\">\u516d\u3001\u672c\u7bc7\u5c0f\u7ed3<\/h3>\n<p>\u6392\u67e5\u9ec4\u91d1\u6cd5\u5219&#xff1a;<\/p>\n<li>\n<p>\u5148\u5b8f\u89c2\u540e\u5fae\u89c2&#xff1a;\u5148\u770b\u5168\u5c40&#xff08;uptime\/vmstat\/df&#xff09;&#xff0c;\u9501\u5b9a\u65b9\u5411\u540e\u518d\u6df1\u5165\u7ec6\u8282<\/p>\n<\/li>\n<li>\n<p>\u5148\u6392\u9664\u6700\u7b80\u5355\u7684\u539f\u56e0&#xff1a;\u78c1\u76d8\u6ee1\u4e86\u3001\u670d\u52a1\u6302\u4e86\u3001\u5185\u5b58\u6ea2\u51fa\u4e86\u2014\u2014\u8fd9\u4e9b\u8fdc\u6bd4\u4ee3\u7801bug\u66f4\u5e38\u89c1<\/p>\n<\/li>\n<li>\n<p>\u4e00\u6b21\u53ea\u9a8c\u8bc1\u4e00\u4e2a\u5047\u8bbe&#xff1a;\u4e0d\u8981\u540c\u65f6\u6539\u4e09\u4e2a\u914d\u7f6e&#xff0c;\u6539\u5b8c\u4e00\u4e2a\u5c31\u9a8c\u8bc1&#xff0c;\u5426\u5219\u4e0d\u77e5\u9053\u54ea\u4e2a\u751f\u6548\u4e86<\/p>\n<\/li>\n<li>\n<p>\u6bcf\u4e00\u6b65\u4fdd\u5b58\u8bc1\u636e&#xff1a;script\u547d\u4ee4\u8bb0\u5f55\u7ec8\u7aef\u64cd\u4f5c&#xff0c;sar\u5386\u53f2\u6570\u636e\u56de\u6eaf\u95ee\u9898\u53d1\u751f\u65f6\u7684\u7cfb\u7edf\u72b6\u6001<\/p>\n<\/li>\n<p>\u4e09\u4e2a\u9ad8\u9891\u6545\u969c\u7684\u5b8c\u6574\u94fe\u8def&#xff1a;<\/p>\n<ul>\n<li>\n<p>CPU\u98d9\u5347&#xff1a;top\u627e\u8fdb\u7a0b \u2192\u00a0top -H\u627e\u7ebf\u7a0b \u2192\u00a0jstack\/perf top\u770b\u8c03\u7528\u6808<\/p>\n<\/li>\n<li>\n<p>\u5185\u5b58\u6cc4\u6f0f&#xff1a;smem\u627e\u8fdb\u7a0b \u2192\u00a0pmap\u786e\u8ba4\u6cc4\u6f0f\u533a\u57df \u2192\u00a0valgrind&#xff08;\u5f00\u53d1\u73af\u5883&#xff09;\u5b9a\u4f4d\u4ee3\u7801\u884c<\/p>\n<\/li>\n<li>\n<p>\u78c1\u76d8\u9690\u5f62\u5360\u7528&#xff1a;df\u00a0vs\u00a0du\u53d1\u73b0\u5dee\u5f02 \u2192\u00a0lsof &#043;L1\u627e(deleted)\u6587\u4ef6 \u2192\u00a0truncate\u6216kill -HUP\u91ca\u653e<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"%E5%8A%A8%E6%89%8B%E7%BB%83%E4%B9%A0\">\u52a8\u624b\u7ec3\u4e60<\/h4>\n<p>bash<\/p>\n<p># 1. \u5b8c\u6574\u8dd1\u4e00\u6b21\u7cfb\u7edf\u4f53\u68c0\u6d41\u7a0b<br \/>\nuptime &amp;&amp; free -h &amp;&amp; df -h &amp;&amp; vmstat 2 5<\/p>\n<p># 2. \u6a21\u62df\u201c\u5220\u9664\u4e86\u6587\u4ef6\u4f46\u7a7a\u95f4\u4e0d\u91ca\u653e\u201d\u7684\u573a\u666f<br \/>\ndd if&#061;\/dev\/zero of&#061;\/tmp\/bigdel bs&#061;1M count&#061;100<br \/>\nexec 3&lt;&gt;\/tmp\/bigdel   # \u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\u6301\u6709\u6587\u4ef6<br \/>\nrm \/tmp\/bigdel        # \u5220\u9664\u6587\u4ef6<br \/>\ndf -h \/tmp            # \u6ce8\u610f\u7a7a\u95f4\u6ca1\u91ca\u653e<br \/>\nlsof &#043;L1 | grep bigdel  # \u627e\u5230\u8fd9\u4e2a\u201c\u5e7d\u7075\u201d\u6587\u4ef6<br \/>\nexec 3&gt;&amp;-             # \u5173\u95ed\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff0c;\u7a7a\u95f4\u91ca\u653e<br \/>\ndf -h \/tmp            # \u9a8c\u8bc1\u7a7a\u95f4\u5df2\u6062\u590d<\/p>\n<p># 3. \u89c2\u5bdf\u8fdb\u7a0b\u7684\u5185\u5b58\u53d8\u5316<br \/>\nsmem -p -s pss | head -10 <\/p>\n<h3 id=\"%E4%B8%83%E3%80%81%E4%B8%8B%E7%AF%87%E9%A2%84%E5%91%8A\">\u4e03\u3001\u4e0b\u7bc7\u9884\u544a<\/h3>\n<p>\u8fd9\u662f\u4e13\u680f\u7684\u5012\u6570\u7b2c\u4e8c\u7bc7\u6587\u7ae0\u3002\u6211\u4eec\u8d70\u8fc7\u4e8650\u7bc7\u7684\u6280\u672f\u5b66\u4e60\u2014\u2014\u4ece\u7b2c1\u7bc7\u7684\u201c\u4e3a\u4ec0\u4e48\u8981\u5b66Linux\u201d\u5230\u7b2c48\u7bc7\u7684\u96c6\u7fa4\u9ad8\u53ef\u7528&#xff0c;\u4ece\u6700\u57fa\u7840\u7684cd\u3001ls\u547d\u4ee4\u5230\u5185\u6838\u51fd\u6570\u7ea7\u522b\u7684\u52a8\u6001\u8ffd\u8e2a\u3002<\/p>\n<p>\u6700\u540e\u4e00\u7bc7\u300a\u4e13\u680f\u603b\u7ed3\u4e0eLinux\u5b66\u4e60\u4e4b\u8def\u7684\u672a\u6765\u5c55\u671b\u300b\u5c06\u56de\u987e\u6574\u6761\u5b66\u4e60\u8def\u5f84&#xff0c;\u4f60\u53ef\u4ee5\u5bf9\u7167\u6bcf\u4e00\u7bc7\u7684\u6807\u9898\u68c0\u67e5\u81ea\u5df1\u662f\u5426\u638c\u63e1\u6838\u5fc3\u64cd\u4f5c\u548c\u6392\u67e5\u601d\u8def\u3002\u6211\u4eec\u5c06\u68b3\u7406Linux\u5728\u5f53\u524d\u6280\u672f\u751f\u6001\u4e2d\u7684\u89d2\u8272\u6f14\u53d8\u2014\u2014\u4ece\u4f20\u7edf\u7684\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u5230\u4e91\u8ba1\u7b97\u7684\u57fa\u7840\u955c\u50cf\u3001Kubernetes\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\u3001AI\u8bad\u7ec3\u5e73\u53f0\u7684\u5e95\u5c42\u652f\u6491&#xff1b;\u5e76\u4e3a\u4f60\u89c4\u5212\u540e\u7eed\u7684\u6df1\u5165\u65b9\u5411&#xff1a;\u5bb9\u5668\u7f16\u6392\u3001\u53ef\u89c2\u6d4b\u6027\u4f53\u7cfb\u3001\u5185\u6838\u5f00\u53d1\u7b49\u9886\u57df\u7684\u5b66\u4e60\u8def\u7ebf\u56fe\u3002\u8fd9\u662f\u6574\u4e2a\u4e13\u680f\u7684\u7ec8\u70b9&#xff0c;\u4e5f\u662f\u4f60Linux\u6280\u80fd\u6301\u7eed\u751f\u957f\u7684\u8d77\u70b9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 \u4e00\u3001\u6392\u67e5\u6846\u67b6&#xff1a;\u63a5\u5230\u544a\u8b66\u540e\u7b2c\u4e00\u4ef6\u4e8b\u505a\u4ec0\u4e48<br \/>\n1.1 \u9ec4\u91d15\u5206\u949f&#xff1a;\u5efa\u7acb\u5168\u5c40\u8ba4\u77e5<br \/>\n1.2 \u5feb\u901f\u5b9a\u4f4d\u65b9\u5411&#xff1a;\u770bvmstat\u51b3\u5b9a\u4e0b\u4e00\u6b65<br \/>\n\u4e8c\u3001\u573a\u666f\u4e00&#xff1a;CPU\u98d9\u5347100%<br \/>\n2.1 \u73b0\u8c61<br \/>\n2.2 \u6392\u67e5\u6d41\u7a0b<br \/>\n2.3 CPU\u6392\u67e5\u603b\u7ed3<br \/>\n\u4e09\u3001\u573a\u666f\u4e8c&#xff1a;\u5185\u5b58\u6cc4\u6f0f\u6392\u67e5<br \/>\n3.1 \u73b0\u8c61<br \/>\n3.2 \u6392\u67e5\u6d41\u7a0b<br \/>\n3.3 \u5185\u5b58\u6cc4\u6f0f\u6392\u67e5\u603b\u7ed3<br \/>\n\u56db\u3001\u573a\u666f\u4e09&#xff1a;\u78c1\u76d8\u6ee1\u4e86\u4f46\u627e\u4e0d\u5230\u5927\u6587\u4ef6<br \/>\n4.1 \u73b0\u8c61<br \/>\n4.2 \u6392\u67e5\u6d41\u7a0b <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9098,58,43,44],"topic":[],"class_list":["post-85418","post","type-post","status-publish","format-standard","hentry","category-server","tag-it","tag-linux","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/85418.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \u4e00\u3001\u6392\u67e5\u6846\u67b6&#xff1a;\u63a5\u5230\u544a\u8b66\u540e\u7b2c\u4e00\u4ef6\u4e8b\u505a\u4ec0\u4e48 1.1 \u9ec4\u91d15\u5206\u949f&#xff1a;\u5efa\u7acb\u5168\u5c40\u8ba4\u77e5 1.2 \u5feb\u901f\u5b9a\u4f4d\u65b9\u5411&#xff1a;\u770bvmstat\u51b3\u5b9a\u4e0b\u4e00\u6b65 \u4e8c\u3001\u573a\u666f\u4e00&#xff1a;CPU\u98d9\u5347100% 2.1 \u73b0\u8c61 2.2 \u6392\u67e5\u6d41\u7a0b 2.3 CPU\u6392\u67e5\u603b\u7ed3 \u4e09\u3001\u573a\u666f\u4e8c&#xff1a;\u5185\u5b58\u6cc4\u6f0f\u6392\u67e5 3.1 \u73b0\u8c61 3.2 \u6392\u67e5\u6d41\u7a0b 3.3 \u5185\u5b58\u6cc4\u6f0f\u6392\u67e5\u603b\u7ed3 \u56db\u3001\u573a\u666f\u4e09&#xff1a;\u78c1\u76d8\u6ee1\u4e86\u4f46\u627e\u4e0d\u5230\u5927\u6587\u4ef6 4.1 \u73b0\u8c61 4.2 \u6392\u67e5\u6d41\u7a0b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/85418.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-27T06:08:56+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85418.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/85418.html\",\"name\":\"\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-27T06:08:56+00:00\",\"dateModified\":\"2026-07-27T06:08:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/85418.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/85418.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85418.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/85418.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55 \u4e00\u3001\u6392\u67e5\u6846\u67b6&#xff1a;\u63a5\u5230\u544a\u8b66\u540e\u7b2c\u4e00\u4ef6\u4e8b\u505a\u4ec0\u4e48 1.1 \u9ec4\u91d15\u5206\u949f&#xff1a;\u5efa\u7acb\u5168\u5c40\u8ba4\u77e5 1.2 \u5feb\u901f\u5b9a\u4f4d\u65b9\u5411&#xff1a;\u770bvmstat\u51b3\u5b9a\u4e0b\u4e00\u6b65 \u4e8c\u3001\u573a\u666f\u4e00&#xff1a;CPU\u98d9\u5347100% 2.1 \u73b0\u8c61 2.2 \u6392\u67e5\u6d41\u7a0b 2.3 CPU\u6392\u67e5\u603b\u7ed3 \u4e09\u3001\u573a\u666f\u4e8c&#xff1a;\u5185\u5b58\u6cc4\u6f0f\u6392\u67e5 3.1 \u73b0\u8c61 3.2 \u6392\u67e5\u6d41\u7a0b 3.3 \u5185\u5b58\u6cc4\u6f0f\u6392\u67e5\u603b\u7ed3 \u56db\u3001\u573a\u666f\u4e09&#xff1a;\u78c1\u76d8\u6ee1\u4e86\u4f46\u627e\u4e0d\u5230\u5927\u6587\u4ef6 4.1 \u73b0\u8c61 4.2 \u6392\u67e5\u6d41\u7a0b","og_url":"https:\/\/www.wsisp.com\/helps\/85418.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-27T06:08:56+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/85418.html","url":"https:\/\/www.wsisp.com\/helps\/85418.html","name":"\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-27T06:08:56+00:00","dateModified":"2026-07-27T06:08:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/85418.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/85418.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/85418.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010Linux\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u3011\u7b2c49\u7bc7\uff1a\u670d\u52a1\u5668\u6545\u969c\u6392\u67e5\u7ec8\u6781\u6307\u5357\u2014\u2014\u601d\u8def\u51b3\u5b9a\u51fa\u8def"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=85418"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85418\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=85418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=85418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=85418"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=85418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}