{"id":8145,"date":"2020-07-18T21:21:17","date_gmt":"2020-07-18T13:21:17","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8145"},"modified":"2020-07-18T21:21:18","modified_gmt":"2020-07-18T13:21:18","slug":"nproc","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/nproc","title":{"rendered":"nproc\u547d\u4ee4 – \u663e\u793a\u5f53\u524d\u8fdb\u7a0b\u53ef\u7528\u7684CPU\u6570\u76ee"},"content":{"rendered":"\n

nproc\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u663e\u793a\u5f53\u524d\u8fdb\u7a0b\u53ef\u7528\u7684CPU\u6570\u76ee\uff0c\u8be5\u6570\u76ee\u53ef\u80fd\u5c0f\u4e8e\u5b9e\u9645\u5de5\u4f5c\u6570\u3002<\/p>\n\n\n\n

\u5728\u8ba1\u7b97\u673a\u7cfb\u7edf\u4e0a\u6267\u884c\u7684\u6bcf\u4e2a\u8fdb\u7a0b\u90fd\u9700\u8981CPU\u6267\u884c\u9884\u671f\u7684\u64cd\u4f5c\u3002 \u4f60\u7684\u7cfb\u7edfCPU\u53ef\u80fd\u6709\u65f6\u4f1a\u8fc7\u8f7d\uff08\u7531\u4e8e\u7cfb\u7edf\u4e0a\u8fd0\u884c\u7684\u8fdb\u7a0b\u7684\u6570\u91cf\u6216\u79cd\u7c7b\uff09\uff0c\u65e0\u8bba\u51fa\u4e8e\u4f55\u79cd\u539f\u56e0\uff0c\u60f3\u77e5\u9053\u65b0\u8fdb\u7a0b\u7684\u53ef\u7528\u5904\u7406\u5355\u5143\u6570\u91cf\u5c31\u8981\u7528\u5230nproc\u547d\u4ee4\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>nproc [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

 -- -all<\/td>\u663e\u793a\u6240\u62e5\u6709\u7684CPU\u6570\u76ee <\/td><\/tr>
 -- -ignore=N<\/td> \u5982\u679c\u6709\u53ef\u80fd\uff0c\u5ffd\u7565N\u4e2a\u5904\u7406\u5668<\/td><\/tr>
-- -- help<\/td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f<\/td><\/tr>
-- -version<\/td>\u67e5\u770b\u7248\u672c\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u663e\u793a\u5f53\u524d\u8fdb\u7a0b\u53ef\u7528\u7684CPU\u6570\u76ee\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# nproc\n3<\/pre>\n\n\n\n

\u663e\u793a\u6240\u6709CPU\u6570\u76ee\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# nproc --all\n6<\/pre>\n\n\n\n

\u5ffd\u7565\u6307\u5b9a\u4e2a\u6570\u5904\u7406\u5668\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# nproc --ignore=2\n1<\/pre>\n","protected":false},"excerpt":{"rendered":"

nproc\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u663e\u793a\u5f53\u524d\u8fdb\u7a0b\u53ef\u7528\u7684CPU\u6570\u76ee\uff0c\u8be5\u6570\u76ee\u53ef\u80fd\u5c0f\u4e8e\u5b9e\u9645\u5de5\u4f5c\u6570\u3002 \u5728\u8ba1\u7b97\u673a\u7cfb\u7edf\u4e0a\u6267\u884c\u7684\u6bcf\u4e2a\u8fdb […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8145"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8145"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8145\/revisions"}],"predecessor-version":[{"id":8385,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8145\/revisions\/8385"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}