{"id":216302,"date":"2020-11-20T11:57:50","date_gmt":"2020-11-20T03:57:50","guid":{"rendered":"http:\/\/4563.org\/?p=216302"},"modified":"2020-11-20T11:57:50","modified_gmt":"2020-11-20T03:57:50","slug":"%e5%a4%a7%e4%bd%ac%e4%bb%ac%ef%bc%8c%e6%b1%82%e6%95%99%e4%b8%80%e4%b8%aa%e5%a4%9a%e6%a0%b8-cpu-top-%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=216302","title":{"rendered":"\u5927\u4f6c\u4eec\uff0c\u6c42\u6559\u4e00\u4e2a\u591a\u6838 cpu top \u7684\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5927\u4f6c\u4eec\uff0c\u6c42\u6559\u4e00\u4e2a\u591a\u6838 cpu top \u7684\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : arcaitan <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u6267\u884c top \u547d\u4ee4\u662f\u7c7b\u4f3c\u8fd9\u4e2a\u6837\u5b50: \u00b7\u00b7\u00b7 (sdk) [xxx ~]$ top top &#8211; 15:46:23 up 81 days, 6:09, 7 users, load average: 15.03, 14.66, 20.48 Tasks: 760 total, 20 running, 715 sleeping, 25 stopped, 0 zombie %Cpu(s): 35.7 us, 18.1 sy, 5.4 ni, 40.0 id, 0.2 wa, 0.0 hi, 0.1 si, 0.4 st KiB Mem : 22260643+total, 15450846+free, 18399780 used, 49698192 buff\/cache KiB Swap: 0 total, 0 free, 0 used. 20240766+avail Mem<\/p>\n<p>PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 9055 xxxxxxxx 20 0 3235836 311676 35476 S 47.0 0.1 0:01.42 xxx 8836 xxxxxxxx 20 0 3235836 309780 35504 S 44.4 0.1 0:01.40 xxx \u00b7\u00b7\u00b7<\/p>\n<p>\u5df2\u7ecf\u77e5\u9053\u673a\u5668\u662f 36 \u6838\u7684\uff0c<\/p>\n<p>\u6211\u67e5\u4e86\u4e00\u4e0b\uff0c\u5b83\u7269\u7406 cpu \u4e2a\u6570\u662f 2\uff0c\u6bcf\u4e2a\u7269\u7406 cpu \u7684\u6838\u6570\u662f 18\uff0c<\/p>\n<p>\u6709\u6ca1\u6709\u5927\u4f6c\u544a\u8bc9\u6211\u600e\u4e48\u770b\u8fd9\u4e2a load avergage\uff0c\u548c\u4e0b\u9762\u7684%CPU \u5360\u7528\u7387\u548c\u8fd9\u4e2a cpu \u6838\u6570\u7684\u5bf9\u5e94\u5173\u7cfb\uff1f<\/p>\n<p>\u7f51\u4e0a\u641c\u4e86\u534a\u5929\u6ca1\u627e\u5230\u8bb2\u5f97\u6e05\u695a\u4e86\uff0c\u80fd\u4e0d\u80fd\u6c42 v \u7ad9\u5927\u4f6c\u7ed9\u70b9\u6307\u5bfc\uff1f\u6216\u8005\u544a\u8bc9\u6211\u53bb\u770b\u90a3\u4e9b\u8d44\u6599\u53ef\u4ee5\u83b7\u53d6\u5230\u8fd9\u4e2a\u4fe1\u606f\uff1f<\/p>\n<p>\u8dea\u8c22<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>15<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4392476\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : weizhen199 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0b\u4e2a nmon \u8bd5\u8bd5\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392477\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : arcaitan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e3a\u4ec0\u4e48\u6211\u7528\u00b7\u00b7\u00b7\uff0cmd \u8bed\u6cd5\u6ca1\u751f\u6548&#8211;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392478\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Vegetable <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u56e0\u4e3a\u4f60\u7528\u4e86\u4e2d\u6587\u7684\u00b7\u800c\u4e0d\u662f`\uff0c\u6240\u4ee5\u683c\u5f0f\u6ca1\u51fa\u6765\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392479\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : arcaitan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Vegetable \u6c57\u989c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392480\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : arcaitan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @weizhen199 \u6211\u5c31\u662f\u7528 cpulimit -p 47380 -l 10 \u8fd9\u79cd\uff0c\u60f3\u9650\u5236\u67d0\u4e2a\u8fdb\u7a0b\u4e0d\u8981\u5360\u6ee1 cpu\uff0c\u7136\u540e\u53d1\u73b0\u6574\u4e2a\u591a\u6838\u72b6\u6001\u5f88\u56f0\u6270                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392481\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : woshiaha <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             load avergage \u5e76\u4e0d\u4e00\u5b9a\u548c cpu \u8d1f\u8f7d\u5bf9\u5e94 \u56e0\u4e3a\u5728\u67d0\u4e00\u4e2a\u7248\u672c\u7684 linux \u4fee\u6539\u4e2d \u5c06\u786c\u76d8 io \u8fd9\u4e9b\u56e0\u7d20\u4e5f\u8003\u8651\u4e86\u8fdb\u53bb \u4f60\u5982\u679c\u53bb\u653e\u4e2a IO \u91cf\u5927\u7684\u670d\u52a1\u4e0a\u53bb\u538b\u6d4b\u53ef\u4ee5\u968f\u4fbf\u538b\u5230 100 \u591a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392482\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lvzhiqiang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5e73\u5747\u8d1f\u8f7d\u548c CPU \u4f7f\u7528\u7387\u6ca1\u6709\u5fc5\u7136\u7684\u5173\u7cfb\u3002 \u5e73\u5747\u8d1f\u8f7d\u662f\u6307\u5355\u4f4d\u65f6\u95f4\u5185\uff0c\u7cfb\u7edf\u5904\u4e8e\u53ef\u8fd0\u884c\u72b6\u6001\u548c\u4e0d\u53ef\u4e2d\u65ad\u72b6\u6001\u7684\u5e73\u5747\u8fdb\u7a0b\u6570\uff0c\u4e5f\u5c31\u662f\u5e73\u5747\u6d3b\u8dc3\u7684\u8fdb\u7a0b\u6570\u3002\u4e00\u822c\u4e0d\u53ef\u4e2d\u65ad\u72b6\u6001\u7684\u8fdb\u7a0b\uff0cIO \u8fdb\u7a0b\u4e3a\u4e3b\u3002 &#8212; \u63a8\u8350\u8d44\u6599\uff0c\u4f60\u53ef\u4ee5\u770b\u770b\u6781\u5ba2\u65f6\u95f4 Linux \u6027\u80fd\u4f18\u5316\u5b9e\u6218 \u8fd9\u95e8\u8bfe\u7a0b\uff0c\u8bb2\u4e86\u5f88\u591a\u6709\u5173\u6027\u80fd\u65b9\u9762\u7684\u77e5\u8bc6\u548c\u5b9e\u6218\u6280\u5de7\u3002 &#8212; \u5982\u679c\u770b\u8d77\u6765\u6709\u96be\u5ea6\u7684\u8bdd\uff0c\u5efa\u8bae\u8865\u4e0b\u64cd\u4f5c\u7cfb\u7edf \u8fdb\u7a0b\u7ba1\u7406\u65b9\u9762\u7684\u77e5\u8bc6\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392483\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : arcaitan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lvzhiqiang \u8c22\u8c22\uff0c\u6211\u660e\u5929\u770b\u4e00\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392484\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dorothyREN <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             36 \u6838\u6ee1\u8f7d \u662f 3600%                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392485\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : laminux29 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u7814\u7a76\u65b9\u5411\u5f04\u9519\u4e86\u3002\u4f60\u5e94\u8be5\u53bb\u4ece\u6e90\u7801\u5206\u6790\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392486\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhuan475 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6309 1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392487\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : arcaitan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @laminux29\u00a0\u00a0\u4ec0\u4e48\u610f\u601d\uff1f\u770b linux \u5185\u6838\u6e90\u7801\u4e48\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392488\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : libook <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Load Average \u4e09\u4e2a\u503c\uff0c\u5206\u522b\u662f\u6700\u8fd1 1 \u5206\u949f\u30015 \u5206\u949f\u300115 \u5206\u949f\u7684\u5e73\u5747\u8d1f\u8f7d\u503c\u3002<br \/>\u503c\u4ee3\u8868\u7684\u610f\u601d\u662f\u5f53\u524d\u6709\u591a\u5c11\u4e2a\u4efb\u52a1\u5728\u7b49\u5f85\u88ab\u5904\u7406\u3002\u5982\u679c\u63a5\u8fd1 0 \u5c31\u4ee3\u8868\u73b0\u5728\u7cfb\u7edf\u8d1f\u8f7d\u5f88\u4f4e\uff0c\u4e0d\u4f1a\u6709\u4efb\u52a1\u5806\u79ef\uff1b\u8d8a\u9ad8\u5c31\u4ee3\u8868\u4efb\u52a1\u51fa\u73b0\u4e86\u5806\u79ef\u3002<\/p>\n<p>\u4f46\u662f\u5bf9\u4e8e\u591a(\u903b\u8f91)\u6838 CPU \u6765\u8bf4\uff0c\u5b83\u80fd\u540c\u65f6\u5b8c\u6210\u591a\u4e2a\u4efb\u52a1\uff1b\u6bd4\u5982 8 \u6838\u5fc3 CPU\uff0c\u5f53\u77ac\u65f6\u8d1f\u8f7d 16 \u3001\u4e14\u6ca1\u6709\u65b0\u7684\u4efb\u52a1\u52a0\u5165\u3001\u4e14\u4e0d\u5b58\u5728\u5176\u4ed6\u74f6\u9888\u7684\u60c5\u51b5\u4e0b\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b CPU \u5904\u7406\u5b8c\u624b\u91cc\u7684\u6240\u6709\u4efb\u52a1\u53ef\u4ee5\u76f4\u63a5\u4ece\u7b49\u5f85\u7684\u4efb\u52a1\u91cc\u62ff\u8d70 8 \u4e2a\u53bb\u5904\u7406\uff0c\u5c06\u8d1f\u8f7d\u4ece 16 \u964d\u4e3a 8 \u3002\u6240\u4ee5\u4e00\u822c\u6765\u8bf4\uff0c\u8d1f\u8f7d\u8fbe\u5230 CPU \u603b\u6838\u5fc3\u6570\u4ee3\u8868 100%\u6ee1\u8f7d\uff0c\u8d85\u8fc7\u5c31\u662f\u8fc7\u8f7d\uff0c\u4f4e\u5c31\u662f\u7a7a\u8f7d\u3002<\/p>\n<p>\u8fd9\u662f\u4e2a\u7cfb\u7edf\u5b8f\u89c2\u7efc\u5408\u8d1f\u8f7d\u7684\u8868\u8fbe\uff0c\u4e0d\u4ee3\u8868\u7cfb\u7edf\u4e2d\u67d0\u4e00\u4e2a\u7ec4\u4ef6\u7684\u6027\u80fd\u60c5\u51b5\uff0c\u6bd4\u5982\u5185\u5b58\u3001\u78c1\u76d8\u3001\u7f51\u7edc\u3001\u8bbe\u5907\u7b49\u77ed\u677f\u4e5f\u90fd\u4f1a\u5bfc\u81f4\u4efb\u52a1\u4e0d\u80fd\u5c3d\u5feb\u5b8c\u6210\uff0c\u9020\u6210\u4efb\u52a1\u5806\u79ef\uff0c\u6b64\u65f6 CPU \u53ef\u80fd\u8fd8\u5728\u7a7a\u8f6c\uff0c\u4f46\u5bf9\u4e8e\u7cfb\u7edf\u6765\u8bf4\u53ef\u80fd\u5df2\u7ecf\u8fc7\u8f7d\u3002<\/p>\n<p>\u60f3\u8981\u89e3\u51b3\u8fc7\u8f7d\u95ee\u9898\u7684\u8bdd\uff0c\u8fd8\u662f\u5f97\u770b\u7cfb\u7edf\u5404\u4e2a\u8d44\u6e90\u7684\u5177\u4f53\u60c5\u51b5\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392489\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : arcaitan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @libook \u00a0\u8c22\u8c22\u56de\u590d\u3002\u6240\u4ee5 36 \u6838\uff0c\u5982\u679c load \u7684 1 \u5206\u949f\u5bf9\u5e94\u7684\u503c\u662f 36 \u5c31\u662f\u6ee1\u8f7d\uff0c\u5b83\u548c cpu \u4e5f\u4e0d\u5f3a\u76f8\u5173\uff0c\u56e0\u4e3a\u6709\u65f6\u5019\u8fd9\u4e2a\u503c\u9760\u8fd1 36\uff0c\u4f46\u662f\u4e0b\u9762\u663e\u793a\u7684 cpu \u5360\u6709\u7387\u52a0\u8d77\u6765\u5e76\u4e0d\u662f 3600%\uff0c\u6211\u60f3\u77e5\u9053\uff0c\u5982\u679c\u67d0\u4e00\u4e2a\u8fdb\u7a0b\u5bf9\u5e94\u540e\u9762\u7684\u503c\u662f 101%\uff0c\u5b83\u662f\u6307\u5360\u6709\u7684 36 \u6838 cpu \u7684\u603b\u91cf\uff0c\u90a3\u6211\u600e\u4e48\u77e5\u9053\u5b83\u5360\u7684\u5404\u4e2a cpu \u662f\u591a\u5c11\u5462\uff1f\u8fd8\u662f\u8bf4\u6211\u5176\u5b9e\u4e0d\u9700\u8981\u5173\u5fc3\u8fd9\u4e2a\uff0c\u5bf9\u4e8e\u7cfb\u7edf\u6765\u8bf4\u5b83\u662f\u7edf\u4e00\u8c03\u5ea6\u8005 36 \u6838\u7684\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4392490\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : libook <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @arcaitan \u6bcf\u4e2a\u8fdb\u7a0b\u7684%CPU \u503c\u4ee3\u8868\u5360\u7528 CPU \u8ba1\u7b97\u65f6\u95f4\uff0c100%\u76f8\u5f53\u4e8e 1 \u4e2a\u6838\u5fc3\u7684\u5168\u90e8\u8ba1\u7b97\u65f6\u95f4\uff0c\u6240\u4ee5\u591a\u7ebf\u7a0b\u53ef\u80fd\u4f1a\u5bfc\u81f4\u8fd9\u4e2a\u8d85\u8fc7 100%\uff0c\u4f46 100%\u5e76\u4e0d\u4ee3\u8868\u5b8c\u5168\u5728\u7528\u67d0 1 \u4e2a\u6838\u5fc3\uff0c\u64cd\u4f5c\u7cfb\u7edf\u4f1a\u8c03\u5ea6\u6240\u6709\u7684\u6838\u5fc3\uff0c\u4f7f\u7528\u6210\u719f\u7684\u7b97\u6cd5\u6700\u5927\u5316\u8d44\u6e90\u7684\u5229\u7528\u6548\u7387\uff0c\u9664\u975e\u4f7f\u7528\u4e86\u67d0\u79cd\u7ed1\u5b9a\u673a\u5236\u5f3a\u5236\u7ed1\u5b9a\u4e00\u4e9b\u6838\u5fc3\u4f7f\u7528\u3002<br \/>\u6240\u4ee5\u4f60\u4e0d\u9700\u8981\u5173\u5fc3\u5177\u4f53\u662f\u54ea\u4e2a\u6838\u5fc3\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u4f6c\u4eec\uff0c\u6c42\u6559\u4e00\u4e2a\u591a\u6838 cpu to&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/216302"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=216302"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/216302\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=216302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=216302"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=216302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}