{"id":63685,"date":"2025-04-29T09:29:22","date_gmt":"2025-04-29T01:29:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63685\/"},"modified":"2025-04-29T09:29:22","modified_gmt":"2025-04-29T01:29:22","slug":"linux%e5%ae%9a%e6%97%b6%e5%99%a8%e6%80%8e%e4%b9%88%e6%9f%a5%e7%9c%8b-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63685\/","title":{"rendered":"linux\u5b9a\u65f6\u5668\u600e\u4e48\u67e5\u770b"},"content":{"rendered":"<blockquote><p>\n  \u67e5\u770b linux \u5b9a\u65f6\u5668\u7684\u65b9\u6cd5\u6709\uff1a\u67e5\u770b \/proc\/timer_list \u6587\u4ef6\u4ee5\u83b7\u53d6\u6240\u6709\u6d3b\u52a8\u5b9a\u65f6\u5668\u4fe1\u606f\u3002\u67e5\u770b \/proc\/interrupts \u6587\u4ef6\u4e86\u89e3\u5b9a\u65f6\u5668\u4e2d\u65ad\u4fe1\u606f\u3002\u4f7f\u7528 top \u547d\u4ee4\u67e5\u770b\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u5b9a\u65f6\u5668\u4f7f\u7528\u60c5\u51b5\u3002\u4f7f\u7528 ps -l \u547d\u4ee4\u67e5\u770b\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u5b9a\u65f6\u5668\u4f7f\u7528\u60c5\u51b5\u3002\u4f7f\u7528 dmesg \u547d\u4ee4\u67e5\u770b\u5185\u6838\u7f13\u51b2\u533a\u7684\u5b9a\u65f6\u5668\u4e8b\u4ef6\u4fe1\u606f\u3002\u4f7f\u7528 timerstat \u5de5\u5177\u67e5\u770b\u5355\u4e2a\u5b9a\u65f6\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/04\/2024060411481714063.jpg\" class=\"aligncenter\" title=\"linux\u5b9a\u65f6\u5668\u600e\u4e48\u67e5\u770b\u63d2\u56fe\" alt=\"linux\u5b9a\u65f6\u5668\u600e\u4e48\u67e5\u770b\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u67e5\u770b Linux \u5b9a\u65f6\u5668<\/strong><\/p>\n<p>\u67e5\u770b Linux \u5b9a\u65f6\u5668\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u65b9\u6cd5\uff1a<\/p>\n<p><strong>1. \/proc\/timer_list<\/strong><\/p>\n<p>\u6b64\u6587\u4ef6\u5305\u542b\u6709\u5173\u7cfb\u7edf\u4e0a\u6240\u6709\u6d3b\u52a8\u5b9a\u65f6\u5668\u7684\u4fe1\u606f\u3002\u5b83\u663e\u793a\u4e86\u5b9a\u65f6\u5668\u6240\u5c5e\u7684\u8fdb\u7a0b\u3001\u5230\u671f\u65f6\u95f4\u3001\u4ee5\u53ca\u5904\u7406\u7a0b\u5e8f\u540d\u79f0\u3002<\/p>\n<p><strong>2. \/proc\/interrupts<\/strong><\/p>\n<p>\u6b64\u6587\u4ef6\u5305\u542b\u6709\u5173\u7cfb\u7edf\u4e0a\u6240\u6709\u4e2d\u65ad\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u5b9a\u65f6\u5668\u4e2d\u65ad\u3002\u5b83\u663e\u793a\u4e86\u4e2d\u65ad\u53f7\u3001\u670d\u52a1\u7a0b\u5e8f\u540d\u79f0\u3001\u4ee5\u53ca\u5230\u76ee\u524d\u4e3a\u6b62\u6536\u5230\u7684\u4e2d\u65ad\u6b21\u6570\u3002<\/p>\n<p><strong>3. top \u547d\u4ee4<\/strong><\/p>\n<p>top \u547d\u4ee4\u662f\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u8fdb\u7a0b\u76d1\u63a7\u5668\uff0c\u5b83\u53ef\u4ee5\u663e\u793a\u6709\u5173\u7cfb\u7edf\u4e0a\u6b63\u5728\u8fd0\u884c\u8fdb\u7a0b\u7684\u4fe1\u606f\u3002\u5b83\u5305\u62ec\u6709\u5173\u6bcf\u4e2a\u8fdb\u7a0b\u7684 CPU \u4f7f\u7528\u60c5\u51b5\u3001\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u3001\u548c\u5b9a\u65f6\u5668\u4f7f\u7528\u60c5\u51b5\u7684\u4fe1\u606f\u3002<\/p>\n<p><strong>4. ps \u547d\u4ee4<\/strong><\/p>\n<p>ps \u547d\u4ee4\u7528\u4e8e\u663e\u793a\u7cfb\u7edf\u4e0a\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u7684\u4fe1\u606f\u3002\u901a\u8fc7\u4f7f\u7528 -l \u9009\u9879\uff0c\u60a8\u53ef\u4ee5\u67e5\u770b\u6709\u5173\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u8be6\u7ec6\u7edf\u8ba1\u4fe1\u606f\uff0c\u5305\u62ec\u5b9a\u65f6\u5668\u4f7f\u7528\u60c5\u51b5\u3002<\/p>\n<p><strong>5. dmesg \u547d\u4ee4<\/strong><\/p>\n<p>dmesg \u547d\u4ee4\u7528\u4e8e\u663e\u793a\u5185\u6838\u7f13\u51b2\u533a\u7684\u65e5\u5fd7\u6d88\u606f\u3002\u5b83\u53ef\u80fd\u5305\u542b\u6709\u5173\u5b9a\u65f6\u5668\u4e8b\u4ef6\u7684\u4fe1\u606f\uff0c\u4f8b\u5982\u5b9a\u65f6\u5668\u521b\u5efa\u6216\u89e6\u53d1\u3002<\/p>\n<p>\u4e3a\u4e86\u67e5\u770b\u7279\u5b9a\u5b9a\u65f6\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528 timerstat \u5de5\u5177\u3002\u6b64\u5de5\u5177\u53ef\u4ee5\u663e\u793a\u6709\u5173\u5355\u4e2a\u5b9a\u65f6\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f8b\u5982\u5230\u671f\u65f6\u95f4\u3001\u5904\u7406\u7a0b\u5e8f\u540d\u79f0\uff0c\u4ee5\u53ca\u5269\u4f59\u65f6\u95f4\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5b9a\u65f6\u5668\u600e\u4e48\u67e5\u770b\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>\u67e5\u770b linux \u5b9a\u65f6\u5668\u7684\u65b9\u6cd5\u6709\uff1a\u67e5\u770b \/proc\/timer_list \u6587\u4ef6\u4ee5\u83b7\u53d6\u6240\u6709\u6d3b\u52a8\u5b9a\u65f6\u5668\u4fe1\u606f\u3002\u67e5\u770b \/proc\/interrupts \u6587\u4ef6\u4e86\u89e3\u5b9a\u65f6\u5668\u4e2d\u65ad\u4fe1\u606f\u3002\u4f7f\u7528 top \u547d\u4ee4\u67e5\u770b\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u5b9a\u65f6\u5668\u4f7f\u7528\u60c5\u51b5\u3002\u4f7f\u7528 ps -l \u547d\u4ee4\u67e5\u770b\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u5b9a\u65f6\u5668\u4f7f\u7528\u60c5\u51b5\u3002\u4f7f\u7528 dmesg \u547d\u4ee4\u67e5\u770b\u5185\u6838\u7f13\u51b2\u533a\u7684\u5b9a\u65f6\u5668\u4e8b\u4ef6\u4fe1\u606f\u3002\u4f7f\u7528 timerstat \u5de5\u5177\u67e5\u770b\u5355\u4e2a\u5b9a\u65f6\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\u3002 \u5982\u4f55\u67e5\u770b Linux \u5b9a\u65f6\u5668 \u67e5\u770b Linux \u5b9a\u65f6\u5668\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u65b9\u6cd5\uff1a 1. \/proc\/timer_list \u6b64\u6587\u4ef6\u5305\u542b\u6709\u5173\u7cfb\u7edf\u4e0a\u6240\u6709\u6d3b\u52a8\u5b9a\u65f6\u5668\u7684\u4fe1\u606f\u3002\u5b83\u663e\u793a\u4e86\u5b9a\u65f6\u5668\u6240\u5c5e\u7684\u8fdb\u7a0b\u3001\u5230\u671f\u65f6\u95f4\u3001\u4ee5\u53ca\u5904\u7406\u7a0b\u5e8f\u540d\u79f0\u3002 2. \/proc\/interrupts \u6b64\u6587\u4ef6\u5305\u542b\u6709\u5173\u7cfb\u7edf\u4e0a\u6240\u6709\u4e2d\u65ad\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u5b9a\u65f6\u5668\u4e2d\u65ad\u3002\u5b83\u663e\u793a\u4e86\u4e2d\u65ad\u53f7\u3001\u670d\u52a1\u7a0b\u5e8f\u540d\u79f0\u3001\u4ee5\u53ca\u5230\u76ee\u524d\u4e3a\u6b62\u6536\u5230\u7684\u4e2d\u65ad\u6b21\u6570\u3002 3. top \u547d\u4ee4 top \u547d\u4ee4\u662f\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u8fdb\u7a0b\u76d1\u63a7\u5668\uff0c\u5b83\u53ef\u4ee5\u663e\u793a\u6709\u5173\u7cfb\u7edf\u4e0a\u6b63\u5728\u8fd0\u884c\u8fdb\u7a0b\u7684\u4fe1\u606f\u3002\u5b83\u5305\u62ec\u6709\u5173\u6bcf\u4e2a\u8fdb\u7a0b\u7684 CPU \u4f7f\u7528\u60c5\u51b5\u3001\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u3001\u548c\u5b9a\u65f6\u5668\u4f7f\u7528\u60c5\u51b5\u7684\u4fe1\u606f\u3002 4. ps \u547d\u4ee4 ps \u547d\u4ee4\u7528\u4e8e\u663e\u793a\u7cfb\u7edf\u4e0a\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u7684\u4fe1\u606f\u3002\u901a\u8fc7\u4f7f\u7528 -l \u9009\u9879\uff0c\u60a8\u53ef\u4ee5\u67e5\u770b\u6709\u5173\u6bcf\u4e2a\u8fdb\u7a0b\u7684\u8be6\u7ec6\u7edf\u8ba1\u4fe1\u606f\uff0c\u5305\u62ec\u5b9a\u65f6\u5668\u4f7f\u7528\u60c5\u51b5\u3002 5. dmesg \u547d\u4ee4 dmesg \u547d\u4ee4\u7528\u4e8e\u663e\u793a\u5185\u6838\u7f13\u51b2\u533a\u7684\u65e5\u5fd7\u6d88\u606f\u3002\u5b83\u53ef\u80fd\u5305\u542b\u6709\u5173\u5b9a\u65f6\u5668\u4e8b\u4ef6\u7684\u4fe1\u606f\uff0c\u4f8b\u5982\u5b9a\u65f6\u5668\u521b\u5efa\u6216\u89e6\u53d1\u3002 \u4e3a\u4e86\u67e5\u770b\u7279\u5b9a\u5b9a\u65f6\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528 timerstat \u5de5\u5177\u3002\u6b64\u5de5\u5177\u53ef\u4ee5\u663e\u793a\u6709\u5173\u5355\u4e2a\u5b9a\u65f6\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f8b\u5982\u5230\u671f\u65f6\u95f4\u3001\u5904\u7406\u7a0b\u5e8f\u540d\u79f0\uff0c\u4ee5\u53ca\u5269\u4f59\u65f6\u95f4\u3002 \u4ee5\u4e0a\u5c31\u662f\u5b9a\u65f6\u5668\u600e\u4e48\u67e5\u770b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/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-63685","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63685","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=63685"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63685\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}