{"id":148428,"date":"2022-08-14T14:37:13","date_gmt":"2022-08-14T06:37:13","guid":{"rendered":"http:\/\/www.idc.net\/help\/148428\/"},"modified":"2022-08-14T14:37:13","modified_gmt":"2022-08-14T06:37:13","slug":"%e5%a6%82%e4%bd%95%e6%9f%a5%e7%9c%8blinux%e4%b8%8b%e7%9a%84core%e6%96%87%e4%bb%b6%e5%a4%a7%e5%b0%8f-linux%e4%b8%8b%e6%9f%a5core%e6%96%87%e4%bb%b6%e5%a4%a7%e5%b0%8f","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/148428\/","title":{"rendered":"\u5982\u4f55\u67e5\u770bLinux\u4e0b\u7684core\u6587\u4ef6\u5927\u5c0f (linux\u4e0b\u67e5core\u6587\u4ef6\u5927\u5c0f)"},"content":{"rendered":"<p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0ccore\u6587\u4ef6\u662f\u7531\u64cd\u4f5c\u7cfb\u7edf\u751f\u6210\u7684\u4e00\u79cd\u7279\u6b8a\u6587\u4ef6\uff0c\u7528\u4e8e\u8bb0\u5f55\u7a0b\u5e8f\u5d29\u6e83\u65f6\u7684\u72b6\u6001\u4fe1\u606f\u3002\u8fd9\u79cd\u6587\u4ef6\u901a\u5e38\u5305\u542b\u6709\u5173\u7a0b\u5e8f\u5d29\u6e83\u539f\u56e0\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u56e0\u6b64\u5728\u8c03\u8bd5\u548c\u5206\u6790\u95ee\u9898\u65f6\u975e\u5e38\u6709\u7528\u3002\u7136\u800c\uff0ccore\u6587\u4ef6\u5f88\u5bb9\u6613\u5728\u77ed\u65f6\u95f4\u5185\u5360\u7528\u5927\u91cf\u78c1\u76d8\u7a7a\u95f4\uff0c\u56e0\u6b64\uff0c\u5bf9\u4e8e\u7cfb\u7edf\u7ba1\u7406\u5458\u6765\u8bf4\uff0c\u53ca\u65f6\u76d1\u63a7\u548c\u7ba1\u7406core\u6587\u4ef6\u5927\u5c0f\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<p>\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u67e5\u770bcore\u6587\u4ef6\u7684\u5927\u5c0f\uff0c\u4ee5\u53ca\u5982\u4f55\u63a7\u5236\u548c\u5220\u9664\u65e7\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u4e4b\u4e00\u90e8\u5206\uff1a\u4e86\u89e3\u4ec0\u4e48\u662fcore\u6587\u4ef6<\/p>\n<p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u5f53\u4e00\u4e2a\u8fdb\u7a0b\u56e0\u4e3a\u67d0\u79cd\u539f\u56e0\uff08\u5982\u5185\u5b58\u9519\u8bef\u6216\u5f02\u5e38\u4fe1\u53f7\uff09\u800c\u5d29\u6e83\u65f6\uff0c\u7cfb\u7edf\u4f1a\u751f\u6210\u4e00\u4e2a\u7279\u6b8a\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u5373core\u6587\u4ef6\u3002core\u6587\u4ef6\u5305\u542b\u6709\u5173\u5d29\u6e83\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u4ee5\u5e2e\u52a9\u7cfb\u7edf\u7ba1\u7406\u5458\u627e\u51fa\u9519\u8bef\u7684\u539f\u56e0\u3002core\u6587\u4ef6\u53ef\u4ee5\u5f88\u5927\uff0c\u56e0\u6b64\u5fc5\u987b\u5b9a\u671f\u6e05\u7406\u65e7\u6587\u4ef6\uff0c\u4ee5\u4fbf\u91ca\u653e\u78c1\u76d8\u7a7a\u95f4\u3002<\/p>\n<p>\u5728\u9ed8\u8ba4\u8bbe\u7f6e\u4e0b\uff0cLinux\u7cfb\u7edf\u4f1a\u81ea\u52a8\u4e3a\u6bcf\u4e2a\u8fdb\u7a0b\u751f\u6210\u4e00\u4e2acore\u6587\u4ef6\uff0c\u4f46\u53ea\u6709\u5728\u8fdb\u7a0b\u5728\u751f\u6210core\u6587\u4ef6\u65f6\u6253\u5f00core dump\u529f\u80fd\u624d\u4f1a\u751f\u6210\u3002\u5982\u679c\u8fdb\u7a0b\u6ca1\u6709\u542f\u7528core dump\u529f\u80fd\uff0c\u5219\u4e0d\u4f1a\u751f\u6210\u4efb\u4f55core\u6587\u4ef6\u3002<\/p>\n<p>\u7b2c\u4e8c\u90e8\u5206\uff1a\u67e5\u770bcore\u6587\u4ef6\u5927\u5c0f<\/p>\n<p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u901a\u8fc7\u4f7f\u7528du\u547d\u4ee4\u6765\u67e5\u770b\u67d0\u4e2a\u76ee\u5f55\u4e0b\u6240\u6709core\u6587\u4ef6\u7684\u5927\u5c0f\u3002\u4ee5\u4e0b\u662f\u67e5\u770b\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709core\u6587\u4ef6\u7684\u5927\u5c0f\u7684\u547d\u4ee4\uff1a<\/p>\n<p>du -h *.core<\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u5217\u51fa\u6240\u6709\u5f53\u524d\u76ee\u5f55\u4e0b\u7684core\u6587\u4ef6\u548c\u5b83\u4eec\u7684\u5927\u5c0f\u3002\u901a\u8fc7 -h \u9009\u9879\uff0cdu\u547d\u4ee4\u53ef\u4ee5\u5c06\u7ed3\u679c\u4ee5\u66f4\u6613\u8bfb\u7684\u65b9\u5f0f\u663e\u793a\uff0c\u4f8b\u5982 \u201c2.2G\u201d \u4ee3\u66ff \u201c2325500\u201d\u3002<\/p>\n<p>\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u4f7f\u7528ls\u547d\u4ee4\u6765\u67e5\u770b\u67d0\u4e2a\u76ee\u5f55\u4e0b\u7684\u6240\u6709core\u6587\u4ef6\u53ca\u5176\u65e5\u671f\u3002\u4ee5\u4e0b\u662f\u67e5\u770b\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709core\u6587\u4ef6\u540d\u79f0\u3001\u5927\u5c0f\u548c\u65e5\u671f\u7684\u547d\u4ee4\uff1a<\/p>\n<p>ls -lh *.core<\/p>\n<p>\u6b64\u547d\u4ee4\u5217\u51fa\u4e86\u6240\u6709\u5f53\u524d\u76ee\u5f55\u4e0b\u7684core\u6587\u4ef6\u540d\u79f0\u3001\u5927\u5c0f\u3001\u65e5\u671f\u7b49\u8be6\u7ec6\u4fe1\u606f\u3002\u901a\u8fc7 -l \u9009\u9879\uff0cls\u547d\u4ee4\u5c06\u8f93\u51fa\u8be6\u7ec6\u4fe1\u606f\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u6587\u4ef6\u540d\u3002<\/p>\n<p>\u7b2c\u4e09\u90e8\u5206\uff1a\u7ba1\u7406core\u6587\u4ef6\u5927\u5c0f<\/p>\n<p>\u7ba1\u7406core\u6587\u4ef6\u5927\u5c0f\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u56e0\u4e3a\u5982\u679ccore\u6587\u4ef6\u8d85\u51fa\u78c1\u76d8\u9650\u5236\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6587\u4ef6\u7cfb\u7edf\u6216\u7cfb\u7edf\u672c\u8eab\u51fa\u73b0\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u63a7\u5236\u548c\u5220\u9664Linux\u7cfb\u7edf\u4e2d\u7684core\u6587\u4ef6\uff1a<\/p>\n<p>1. \u8c03\u6574ulimit\u8bbe\u7f6e<\/p>\n<p>ulimit\u547d\u4ee4\u7528\u4e8e\u9650\u5236\u7528\u6237\u8fdb\u7a0b\u4f7f\u7528\u7684\u7cfb\u7edf\u8d44\u6e90\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0culimit\u547d\u4ee4\u53ef\u4ee5\u7528\u6765\u9650\u5236\u751f\u6210\u7684core\u6587\u4ef6\u5927\u5c0f\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0culimit\u4e3a0\uff0c\u8868\u793a\u4e0d\u5141\u8bb8\u751f\u6210\u4efb\u4f55core\u6587\u4ef6\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u5f53\u524d\u7684ulimit\u8bbe\u7f6e\uff1a<\/p>\n<p>ulimit -a<\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u5217\u51fa\u6240\u6709\u5f53\u524dulimit\u8bbe\u7f6e\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5305\u62ec\u751f\u6210core\u6587\u4ef6\u7684\u5927\u5c0f\u9650\u5236\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u66f4\u6539ulimit\u8bbe\u7f6e\uff1a<\/p>\n<p>ulimit -c <\/p>\n<\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u66f4\u6539\u5141\u8bb8\u751f\u6210\u7684core\u6587\u4ef6\u7684\u5927\u5c0f\u9650\u5236\u3002\u201d\u201d \u53c2\u6570\u53ef\u4ee5\u662f\u4e00\u4e2a\u6570\u5b57\uff08\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\uff09\uff0c\u4e5f\u53ef\u4ee5\u662f \u201cunlimited\u201d \u4ee5\u8868\u793a\u4e0d\u9650\u5236core\u6587\u4ef6\u5927\u5c0f\u3002\u4f8b\u5982\uff0c\u8981\u5c06core\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u4e3a2GB\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p>ulimit -c 2023000<\/p>\n<p>2. \u5b9a\u671f\u6e05\u7406core\u6587\u4ef6<\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u5220\u9664\u6240\u6709\u4e0d\u5fc5\u8981\u7684core\u6587\u4ef6\uff1a<\/p>\n<p>find \/ -name \u201ccore.*\u201d -exec rm {} \\;<\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u5728\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u4e2d\u67e5\u627e\u6240\u6709\u6838\u5fc3\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528rm\u547d\u4ee4\u5220\u9664\u5b83\u4eec\u3002\u5982\u679c\u8981\u5220\u9664\u5f53\u524d\u76ee\u5f55\u4e2d\u7684\u6240\u6709core\u6587\u4ef6\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>rm -f *.core<\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u5220\u9664\u5f53\u524d\u76ee\u5f55\u4e2d\u7684\u6240\u6709core\u6587\u4ef6\u3002<\/p>\n<p>3. \u6839\u636e\u9700\u8981\u4fdd\u7559core\u6587\u4ef6<\/p>\n<p>\u5982\u679c\u60a8\u9700\u8981\u4fdd\u7559\u7279\u5b9a\u7684core\u6587\u4ef6\u4ee5\u8fdb\u884c\u8c03\u8bd5\u6216\u5206\u6790\uff0c\u5219\u53ef\u4ee5\u5c06\u5176\u79fb\u52a8\u5230\u5176\u4ed6\u4f4d\u7f6e\uff0c\u4ee5\u4fbf\u5c06\u78c1\u76d8\u7a7a\u95f4\u6e05\u7406\u51fa\u6765\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5c06\u4e00\u4e2acore\u6587\u4ef6\u79fb\u52a8\u5230\u5176\u4ed6\u4f4d\u7f6e\uff1a<\/p>\n<p>mv core_file \/root\/core_file<\/p>\n<p>\u6b64\u547d\u4ee4\u5c06core_file\u6587\u4ef6\u79fb\u52a8\u5230\/root\u76ee\u5f55\u4e2d\u3002\u5728\u79fb\u52a8\u6216\u91cd\u547d\u540dcore\u6587\u4ef6\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u786e\u4fdd\u6587\u4ef6\u6743\u9650\u548c\u6240\u6709\u6743\u4e0e\u539f\u6587\u4ef6\u76f8\u540c\u3002<\/p>\n<p><strong>\u76f8\u5173\u95ee\u9898\u62d3\u5c55\u9605\u8bfb\uff1a<\/strong><\/p>\n<ul>\n<li>linux \u600e\u4e48\u5206\u6790core\u6587\u4ef6<\/li>\n<\/ul>\n<h3>linux \u600e\u4e48\u5206\u6790core\u6587\u4ef6<\/h3>\n<p>Core\uff0c\u53c8\u79f0\u4e4b\u4e3aCore Dump\u6587\u4ef6\uff0c\u662fUnix\/Linux\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e00\u79cd\u673a\u5236\uff0c\u5bf9\u4e8f\u524d\u4e8e\u7ebf\u4e0a\u670d\u52a1\u800c\u8a00\uff0cCore\u4ee4\u4eba\u95fb\u4e4b\u8272\u53d8\uff0c\u56e0\u4e3a\u51faCore\u7684\u8fc7\u7a0b\u610f\u5473\u7740\u670d\u52a1\u6682\u65f6\u4e0d\u80fd\u6b63\u5e38\u54cd\u5e94\uff0c\u9700\u8981\u6062\u590d\uff0c\u5e76\u4e14\u968f\u7740\u5410Core\u8fdb\u7a0b\u7684\u5185\u5b58\u7a7a\u95f4\u9646\u4eff\u8d8a\u5927\uff0c\u6b64\u8fc7\u7a0b\u53ef\u80fd\u6301\u7eed\u9500\u6089\u6e05\u5f88\u957f\u4e00\u6bb5\u65f6\u95f4\uff08\u4f8b\u5982\u5f53\u8fdb\u7a0b\u5360\u7528linux \u600e\u4e48\u5206\u6790core\u6587\u4ef6<\/p>\n<p>linux\u4e0b\u67e5core\u6587\u4ef6\u5927\u5c0f\u7684\u4ecb\u7ecd\u5c31\u804a\u5230\u8fd9\u91cc\u5427\uff0c\u611f\u8c22\u4f60\u82b1\u65f6\u95f4\u9605\u8bfb\u672c\u7ad9\u5185\u5bb9\uff0c\u66f4\u591a\u5173\u4e8elinux\u4e0b\u67e5core\u6587\u4ef6\u5927\u5c0f,\u5982\u4f55\u67e5\u770bLinux\u4e0b\u7684core\u6587\u4ef6\u5927\u5c0f,linux \u600e\u4e48\u5206\u6790core\u6587\u4ef6\u7684\u4fe1\u606f\u522b\u5fd8\u4e86\u5728\u672c\u7ad9\u8fdb\u884c\u67e5\u627e\u5594\u3002<\/p>\n<p><a href=\"http:https:\/\/idc.net\/\">\u9999\u6e2f\u670d\u52a1\u5668<\/a>\u9996\u9009\u540e\u6d6a\u4e91\uff0c2H2G\u9996\u670810\u5143\u5f00\u901a\u3002<br \/>\u540e\u6d6a\u4e91\uff08www.IDC.Net\uff09\u63d0\u4f9b\u7b80\u5355\u597d\u7528\uff0c\u4ef7\u683c\u539a\u9053\u7684\u9999\u6e2f\/\u7f8e\u56fd\u4e91\u670d\u52a1\u5668\u548c\u72ec\u7acb\u670d\u52a1\u5668\u3002IDC+ISP+ICP\u8d44\u8d28\u3002ARIN\u548cAPNIC\u4f1a\u5458\u3002\u6210\u719f\u6280\u672f\u56e2\u961f15\u5e74\u884c\u4e1a\u7ecf\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0ccore\u6587\u4ef6\u662f\u7531\u64cd\u4f5c\u7cfb\u7edf\u751f\u6210\u7684\u4e00\u79cd\u7279\u6b8a\u6587\u4ef6\uff0c\u7528\u4e8e\u8bb0\u5f55\u7a0b\u5e8f\u5d29\u6e83\u65f6\u7684\u72b6\u6001\u4fe1\u606f\u3002\u8fd9\u79cd\u6587\u4ef6\u901a\u5e38\u5305\u542b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-148428","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/148428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=148428"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/148428\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=148428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=148428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=148428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}