{"id":113,"date":"2021-08-06T09:10:47","date_gmt":"2021-08-06T01:10:47","guid":{"rendered":"https:\/\/blog.linsakura.com\/?p=113"},"modified":"2021-08-13T15:04:48","modified_gmt":"2021-08-13T07:04:48","slug":"%e7%ac%94%e8%ae%b0-since-2021-08-06","status":"publish","type":"post","link":"https:\/\/blog.linsakura.com\/index.php\/2021\/08\/06\/%e7%ac%94%e8%ae%b0-since-2021-08-06\/","title":{"rendered":"\u7b14\u8bb0-since-2021-08-06"},"content":{"rendered":"<p>[title]Linux[\/title]<br \/>\n[collapse title=&#8221;coredump\u7684\u4f7f\u7528&#8221;]<br \/>\n\u542f\u7528\u65b9\u5f0f\uff1a<br \/>\n\u5728sh\u4e2d\uff0c\u5728\u542f\u52a8\u7a0b\u5e8f\u524d\uff0c\u4f7f\u7528\u547d\u4ee4<br \/>\nulimit -c unlimited<br \/>\n\u8fd9\u4e2a\u547d\u4ee4\u4ee3\u8868\u4e0d\u9650\u5236core\u7684\u5927\u5c0f\uff0c\u5982\u679c\u8981\u9650\u5236\uff0c<br \/>\nulimit -c 1024   \/\/\u9650\u5236\u751f\u6210\u7684core\u6587\u4ef6\u6700\u5927\u4e3a1024kb<br \/>\n\u5982\u679c\u53ea\u4f7f\u7528ulimt -c\u5c31\u662f\u67e5\u770b\u5f53\u524d\u8bbe\u7f6e\u7684\u5927\u5c0f\uff0c\u5982\u679c\u662f0\uff0c\u5219\u662f\u4e0d\u4f1a\u751f\u6210core\u6587\u4ef6<\/p>\n<p>\u7136\u540e\u5c31\u662f\u751f\u6210core\u6587\u4ef6\u7684\u4f4d\u7f6e\u914d\u7f6e\uff1a<br \/>\nvi \/etc\/sysctl.conf<br \/>\n\u4fee\u6539\u6216\u8005\u6dfb\u52a0\u8fd9\u4e24\u4e2a\u53d8\u91cf\uff1a<br \/>\nkernel.core_pattern=\/var\/core\/core.%e.%p.%s.%t<br \/>\nkernel.core_uses_pid=0<br \/>\n\/var\/core\/\u4ee3\u8868\u751f\u6210core\u5b58\u653e\u7684\u8def\u5f84\uff08\u8def\u5f84\u6587\u4ef6\u5939\u5fc5\u987b\u5b58\u5728\uff09\uff0c\u5982\u679c\u53ea\u60f3\u5728\u8fd0\u884c\u7a0b\u5e8f\u7684\u4f4d\u7f6e\u5b58\u6863\uff0c\u5219\u53bb\u6389\u8def\u5f84\u53ea\u4fdd\u7559core.%e.%p.%s.%t\u5373\u53ef<br \/>\n%e: \u7a0b\u5e8f\u540d\u79f0<br \/>\n%p: \u8fdb\u7a0bID<br \/>\n%s: SIGNAL\u503c<br \/>\n%t: \u65f6\u95f4\u6233<br \/>\n\u4fee\u6539\u5b8csysctl.conf\u4e4b\u540e\uff0c\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u4f7f\u5176\u751f\u6548<br \/>\nsysctl -p\/etc\/sysctl.conf<\/p>\n<p>\u600e\u4e48\u4f7f\u7528core\u6587\u4ef6\uff1f<br \/>\n\u4f8b\u5b50\uff1a\u7a0b\u5e8f\u540d\u79f0(test)\uff0c\u8fdb\u7a0bID(100)\uff0csignal 6\uff0c2021-08-13 14:01:33\u6302\u6389\u7684<br \/>\n\u5219core\u6587\u4ef6\u662f\uff1acore.test.100.6.1628834493<br \/>\n\u4f7f\u7528gdb\u8c03\u8bd5\uff1a<br \/>\ngdb test core.test.100.6.1628834493<br \/>\n\u7136\u540e\u8f93\u5165where\u6216\u8005bt\u5c31\u53ef\u4ee5\u67e5\u770b\u8c03\u8bd5\u4fe1\u606f\u4e86<br \/>\n[\/collapse]<\/p>\n<p>[title]CentOS[\/title]<br \/>\n[collapse title=&#8221;\u67e5\u770bCentOS\u7248\u672c&#8221;]<br \/>\nrpm -q centos-release<br \/>\n[\/collapse]<\/p>\n<p>[collapse title=&#8221;\u8bbe\u7f6e\u65f6\u533a&#8221;]<br \/>\ntimedatectl \u67e5\u770b\u5f53\u524d\u65f6\u533a\u4fe1\u606f<br \/>\n\/\/ cp \/usr\/share\/zoneinfo\/Asia\/Chongqing \/etc\/localtime<br \/>\ntimedatectl set-timezone &#8220;Asia\/Chongqing&#8221; \u8bbe\u7f6e\u65f6\u533a\u4e3a\u91cd\u5e86<br \/>\n[\/collapse]<\/p>\n<p>[collapse title=&#8221;CentOS7 \u5b89\u88c5\u5b57\u4f53&#8221;]<br \/>\n\u5728 \/usr\/local\/share\/fonts \u4e0b\u5efa\u4e00\u4e2a\u76ee\u5f55\uff0c\u628a\u5b57\u4f53\u62f7\u8d1d\u8fdb\u6765<br \/>\n\u8fdb\u5165\u76ee\u5f55\u6267\u884c\uff1a<br \/>\nmkfontscale<br \/>\nmkfontdir<br \/>\nfc-cache -fv<br \/>\n[\/collapse]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[title]Linux[\/title] [collapse title=&#8221;coredump\u7684\u4f7f\u7528&#8221;] \u542f\u7528\u65b9\u5f0f\uff1a \u5728sh\u4e2d\uff0c\u5728\u542f\u52a8\u7a0b\u5e8f\u524d\uff0c\u4f7f\u7528\u547d\u4ee4 ulimit -c unlimited \u8fd9\u4e2a\u547d\u4ee4\u4ee3\u8868\u4e0d\u9650\u5236core\u7684\u5927\u5c0f\uff0c\u5982\u679c\u8981\u9650\u5236\uff0c ulimit -c 1024 \/\/\u9650\u5236\u751f\u6210\u7684core\u6587\u4ef6\u6700\u5927\u4e3a1024kb \u5982\u679c\u53ea\u4f7f\u7528ulimt -c\u5c31\u662f\u67e5\u770b\u5f53\u524d\u8bbe\u7f6e\u7684\u5927\u5c0f\uff0c\u5982\u679c\u662f0\uff0c\u5219 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":1,"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/posts\/113\/revisions\/114"}],"wp:attachment":[{"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.linsakura.com\/index.php\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}