{"id":84681,"date":"2026-07-26T16:09:11","date_gmt":"2026-07-26T08:09:11","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/84681.html"},"modified":"2026-07-26T16:09:11","modified_gmt":"2026-07-26T08:09:11","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%b3%bb%e7%bb%9f%e7%9b%98%e8%a2%ab-syslog-%e5%8d%a0%e6%bb%a1%e7%9a%84%e5%ae%8c%e6%95%b4%e6%8e%92%e6%9f%a5%e4%b8%8e%e8%a7%a3%e5%86%b3%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/84681.html","title":{"rendered":"\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55"},"content":{"rendered":"<h3>\u4e00\u3001\u95ee\u9898\u80cc\u666f\u4e0e\u73b0\u8c61<\/h3>\n<p>\u6211\u7684\u4e00\u53f0\u4e91\u670d\u52a1\u5668\u914d\u7f6e\u4e3a 4 \u6838 CPU\u30014G \u5185\u5b58\u300140G \u7cfb\u7edf\u76d8&#xff0c;\u4e0a\u9762\u8dd1\u4e86\u4e00\u4e2a Java Spring Boot \u5e94\u7528&#xff0c;\u7528 systemd \u505a\u670d\u52a1\u7ba1\u7406\u3002\u67d0\u5929\u5728\u4e91\u63a7\u5236\u53f0\u770b\u5230\u300c\u7528\u91cf\u4e0e\u76d1\u63a7\u300d\u91cc\u51fa\u73b0\u544a\u8b66&#xff1a;<\/p>\n<ul>\n<li>\u7cfb\u7edf\u76d8\u4f7f\u7528\u7387 100%&#xff0c;40G \u5168\u90e8\u7528\u6ee1&#xff0c;\u53ef\u7528\u7a7a\u95f4\u4e3a 0&#xff1b;<\/li>\n<li>CPU \u4f7f\u7528\u7387 100%&#xff1b;<\/li>\n<li>\u5185\u5b58 \u7ea6 67%&#xff1b;<\/li>\n<li>\u7cfb\u7edf\u76d8 IO \u5199\u5165\u7ea6 5MB\/s&#xff0c;\u6301\u7eed\u8f83\u9ad8\u3002<\/li>\n<\/ul>\n<p>\u5e94\u7528\u8bbf\u95ee\u660e\u663e\u53d8\u6162&#xff0c;\u751a\u81f3\u51fa\u73b0\u8d85\u65f6\u3002\u5f53\u65f6\u4e0d\u80fd\u66f4\u6362\u6216\u5347\u7ea7\u670d\u52a1\u5668&#xff0c;\u53ea\u80fd\u4ece\u73b0\u6709\u73af\u5883\u4e0a\u6392\u67e5\u5e76\u5f7b\u5e95\u89e3\u51b3\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u7b2c\u4e00\u6b65&#xff1a;\u5b9a\u4f4d\u662f\u8c01\u5360\u6ee1\u4e86\u78c1\u76d8<\/h3>\n<p>\u6211\u9996\u5148\u5728\u670d\u52a1\u5668\u4e0a\u6267\u884c\u4e86\u4e0b\u9762\u547d\u4ee4&#xff0c;\u770b\u6839\u5206\u533a\u548c\u5404\u76ee\u5f55\u5360\u7528&#xff1a;<\/p>\n<p><span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-h<\/span> \/<br \/>\n<span class=\"token function\">du<\/span> <span class=\"token parameter variable\">-sh<\/span> \/* <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null<\/p>\n<p>\u7ed3\u679c&#xff1a; \u6839\u5206\u533a \/dev\/vda2 \u663e\u793a 40G \u5df2\u7528\u6ee1&#xff0c;\u53ef\u7528 0\u3002\u5728 du -sh \/* \u7684\u8f93\u51fa\u91cc&#xff0c;\/var \u76ee\u5f55\u5360\u7528\u4e86\u7ea6 33G&#xff0c;\u5176\u5b83\u5982 \/usr\u3001\/opt \u7b49\u90fd\u53ea\u6709\u51e0 G \u6216\u66f4\u5c11\u3002\u53ef\u4ee5\u786e\u5b9a\u95ee\u9898\u5728 \/var\u3002<\/p>\n<p>\u63a5\u7740\u8fdb\u5165 \/var \u7ee7\u7eed\u5f80\u4e0b\u770b&#xff1a;<\/p>\n<p><span class=\"token builtin class-name\">cd<\/span> \/var<br \/>\n<span class=\"token function\">du<\/span> <span class=\"token parameter variable\">-sh<\/span> * <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null<\/p>\n<p>\u7ed3\u679c&#xff1a; \/var\/log \u5360\u7ea6 32G&#xff0c;\u5176\u4f59\u5982 lib\u3001cache \u7b49\u90fd\u5f88\u5c0f\u3002\u8bf4\u660e\u662f\u7cfb\u7edf\u65e5\u5fd7\u76ee\u5f55\u5728\u5360\u7a7a\u95f4\u3002<\/p>\n<p>\u518d\u8fdb\u5230 \/var\/log \u770b\u5177\u4f53\u662f\u54ea\u4e9b\u6587\u4ef6&#xff1a;<\/p>\n<p><span class=\"token builtin class-name\">cd<\/span> \/var\/log<br \/>\n<span class=\"token function\">du<\/span> <span class=\"token parameter variable\">-sh<\/span> * <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null<\/p>\n<p>\u7ed3\u679c&#xff1a;<\/p>\n<ul>\n<li>syslog&#xff1a;\u7ea6 11G&#xff1b;<\/li>\n<li>syslog.1&#xff1a;\u7ea6 21G&#xff1b;<\/li>\n<li>journal&#xff1a;\u7ea6 938M&#xff1b;<\/li>\n<li>\u5176\u5b83\u5982 auth.log\u3001btmp\u3001mysql \u7b49\u90fd\u5728\u51e0\u5341 M \u6216\u66f4\u5c0f\u3002<\/li>\n<\/ul>\n<p>\u7ed3\u8bba&#xff1a;\u7cfb\u7edf\u76d8\u88ab\u5360\u6ee1\u7684\u76f4\u63a5\u539f\u56e0&#xff0c;\u5c31\u662f \/var\/log\/syslog \u548c syslog.1 \u8fd9\u4e24\u4e2a\u6587\u4ef6&#xff0c;\u5408\u8ba1\u7ea6 32G\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u7b2c\u4e8c\u6b65&#xff1a;\u7acb\u523b\u91ca\u653e\u7a7a\u95f4&#xff08;\u6e05\u7a7a syslog&#xff09;<\/h3>\n<p>\u5728\u67e5\u539f\u56e0\u7684\u540c\u65f6&#xff0c;\u5fc5\u987b\u5148\u817e\u51fa\u7a7a\u95f4&#xff0c;\u5426\u5219\u5f88\u591a\u64cd\u4f5c\u90fd\u4f1a\u5931\u8d25\u3002\u6211\u505a\u4e86\u4ee5\u4e0b\u64cd\u4f5c&#xff1a;<\/p>\n<p><span class=\"token comment\"># 1. \u6e05\u7a7a\u5f53\u524d syslog&#xff08;\u4fdd\u7559\u6587\u4ef6&#xff0c;\u4fbf\u4e8e rsyslog \u7ee7\u7eed\u5199&#xff09;<\/span><br \/>\n<span class=\"token function\">sudo<\/span> truncate <span class=\"token parameter variable\">-s<\/span> <span class=\"token number\">0<\/span> \/var\/log\/syslog<\/p>\n<p><span class=\"token comment\"># 2. \u5220\u9664\u5df2\u8f6e\u8f6c\u7684\u5927\u6587\u4ef6 syslog.1<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">rm<\/span> \/var\/log\/syslog.1<\/p>\n<p><span class=\"token comment\"># 3. \u5220\u9664\u6240\u6709 syslog \u8f6e\u8f6c\u5907\u4efd\u548c\u538b\u7f29\u5305&#xff08;\u6309\u9700\u53ef\u5148\u5907\u4efd&#xff09;<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">rm<\/span> <span class=\"token parameter variable\">-f<\/span> \/var\/log\/syslog.*<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">rm<\/span> <span class=\"token parameter variable\">-f<\/span> \/var\/log\/syslog.*.gz<\/p>\n<p><span class=\"token comment\"># 4. \u786e\u8ba4\u7a7a\u95f4<\/span><br \/>\n<span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-h<\/span> \/<\/p>\n<p>\u7ed3\u679c&#xff1a; df -h \/ \u663e\u793a\u7cfb\u7edf\u76d8\u4ece\u300c40G \u6ee1\u300d\u53d8\u4e3a \u5df2\u7528\u7ea6 7G&#xff0c;\u53ef\u7528\u7ea6 31G&#xff0c;\u4f7f\u7528\u7387\u7ea6 19%\u3002\u7a7a\u95f4\u7acb\u523b\u91ca\u653e&#xff0c;\u53ef\u4ee5\u7ee7\u7eed\u505a\u540e\u7eed\u914d\u7f6e\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726080910-6a65c0a64bd64.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<hr \/>\n<h3>\u56db\u3001\u7b2c\u4e09\u6b65&#xff1a;\u5f04\u6e05 syslog \u4e3a\u4ec0\u4e48\u4f1a\u957f\u8fd9\u4e48\u5927<\/h3>\n<p>\u6211\u67e5\u4e86\u8d44\u6599\u5e76\u5bf9\u7167\u81ea\u5df1\u7684\u90e8\u7f72\u65b9\u5f0f&#xff0c;\u7406\u6e05\u4e86\u6574\u6761\u94fe\u8def&#xff1a;<\/p>\n<li>\u5e94\u7528&#xff1a;Java \u5e94\u7528&#xff08;Spring Boot&#xff09;\u7684\u65e5\u5fd7\u901a\u8fc7 Logback \u8f93\u51fa\u5230\u4e86\u63a7\u5236\u53f0&#xff08;stdout\/stderr&#xff09;&#xff0c;\u5373 CONSOLE appender \u4e00\u76f4\u5728\u7528\u3002<\/li>\n<li>systemd&#xff1a;\u5e94\u7528\u662f\u7528 systemd \u7ba1\u7406\u7684&#xff0c;service \u6587\u4ef6\u91cc\u914d\u7f6e\u4e86 StandardOutput&#061;journal \u548c StandardError&#061;journal&#xff0c;\u6240\u4ee5\u8fdb\u7a0b\u7684\u6240\u6709\u6807\u51c6\u8f93\u51fa\u3001\u6807\u51c6\u9519\u8bef\u90fd\u4f1a\u88ab systemd \u6536\u5230\u5e76\u5199\u5165 journal\u3002<\/li>\n<li>rsyslog&#xff1a;\u5728 Ubuntu \u4e0a&#xff0c;rsyslog \u4f1a\u4ece journal \u8bfb\u53d6\u8fd9\u4e9b\u5185\u5bb9&#xff0c;\u5e76\u5199\u5165 \/var\/log\/syslog\u3002<\/li>\n<li>logrotate&#xff1a;\u9ed8\u8ba4\u7684 rsyslog \u8f6e\u8f6c\u914d\u7f6e\u591a\u662f\u6309\u5929\u8f6e\u8f6c&#xff0c;\u6ca1\u6709\u6309\u6587\u4ef6\u5927\u5c0f\u505a\u4e25\u683c\u9650\u5236\u3002\u5e94\u7528\u65e5\u5fd7\u91cf\u4e00\u5927&#xff0c;syslog \u5c31\u4f1a\u4e00\u76f4\u589e\u957f&#xff0c;\u76f4\u5230\u628a 40G \u7cfb\u7edf\u76d8\u5199\u6ee1\u3002<\/li>\n<p>\u6240\u4ee5&#xff0c;\u6839\u672c\u539f\u56e0\u662f&#xff1a;\u5e94\u7528\u7684\u63a7\u5236\u53f0\u65e5\u5fd7 \u2192 systemd journal \u2192 rsyslog \u2192 syslog&#xff0c;\u4e14 syslog \u6ca1\u6709\u6309\u5927\u5c0f\u8f6e\u8f6c\u3002\u8981\u5f7b\u5e95\u89e3\u51b3&#xff0c;\u9700\u8981\u4e24\u4ef6\u4e8b&#xff1a;\u4e00\u662f\u9650\u5236 syslog \u5927\u5c0f\u5e76\u8f6e\u8f6c&#xff1b;\u4e8c\u662f\u4ece\u6e90\u5934\u51cf\u5c11\u5199\u5165&#xff08;\u4e0d\u8ba9\u5e94\u7528\u8f93\u51fa\u518d\u8fdb journal\/syslog&#xff09;\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u7b2c\u56db\u6b65&#xff1a;\u4fee\u6539 systemd \u670d\u52a1&#xff0c;\u4e0d\u518d\u628a\u5e94\u7528\u8f93\u51fa\u5199\u5165 journal<\/h3>\n<p>\u6211\u5148\u6539\u7684\u662f systemd&#xff0c;\u8fd9\u6837\u65e0\u9700\u91cd\u65b0\u6253\u5305\u5e94\u7528\u5c31\u80fd\u7acb\u523b\u51cf\u5c11 syslog \u7684\u589e\u957f\u3002<\/p>\n<p>\u7f16\u8f91\u670d\u52a1\u6587\u4ef6&#xff08;\u4f60\u7684\u5b9e\u9645\u670d\u52a1\u540d\u548c\u8def\u5f84\u8bf7\u81ea\u884c\u66ff\u6362&#xff09;&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/systemd\/system\/\u4f60\u7684\u670d\u52a1\u540d.service<\/p>\n<p>\u628a\u5176\u4e2d\u7684&#xff1a;<\/p>\n<p>StandardOutput&#061;journal<br \/>\nStandardError&#061;journal<\/p>\n<p>\u6539\u6210&#xff1a;<\/p>\n<p>StandardOutput&#061;null<br \/>\nStandardError&#061;null<\/p>\n<p>\u4fdd\u5b58\u540e\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> systemctl daemon-reload<br \/>\n<span class=\"token function\">sudo<\/span> systemctl restart \u4f60\u7684\u670d\u52a1\u540d<br \/>\n<span class=\"token function\">sudo<\/span> systemctl status \u4f60\u7684\u670d\u52a1\u540d<\/p>\n<p>\u7ed3\u679c&#xff1a; status \u663e\u793a\u670d\u52a1\u4e3a active (running)&#xff0c;\u5e94\u7528\u6b63\u5e38\u3002\u4e4b\u540e\u5e94\u7528\u7684 stdout\/stderr \u4e0d\u518d\u8fdb\u5165 journal&#xff0c;\u4e5f\u5c31\u4e0d\u4f1a\u518d\u704c\u8fdb syslog&#xff0c;\u8fd9\u4e00\u6b65\u7acb\u5373\u751f\u6548\u3002<\/p>\n<hr \/>\n<h3>\u516d\u3001\u7b2c\u4e94\u6b65&#xff1a;\u914d\u7f6e logrotate&#xff0c;\u8ba9 syslog \u6309\u5927\u5c0f\u8f6e\u8f6c&#xff08;\u8e29\u5751\u8bb0\u5f55&#xff09;<\/h3>\n<p>\u4e3a\u4e86\u9632\u6b62\u4ee5\u540e\u5176\u5b83\u7a0b\u5e8f\u6216\u6b8b\u7559\u65e5\u5fd7\u518d\u628a syslog \u5199\u5927&#xff0c;\u9700\u8981\u8ba9 syslog \u6309\u5927\u5c0f\u8f6e\u8f6c&#xff0c;\u4f8b\u5982\u8d85\u8fc7 50M \u5c31\u8f6e\u8f6c&#xff0c;\u6700\u591a\u4fdd\u7559 3 \u4efd\u3002\u6211\u7f16\u8f91\u4e86 rsyslog \u7684 logrotate \u914d\u7f6e&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/logrotate.d\/rsyslog<\/p>\n<p>\u7b2c\u4e00\u6b21\u6211\u5199\u6210\u4e86\u8fd9\u6837&#xff08;\u9519\u8bef\u793a\u8303&#xff09;&#xff1a;\u5728 \/var\/log\/syslog \u7684\u914d\u7f6e\u5757\u91cc\u52a0\u4e86 su syslog adm&#xff0c;\u5e76\u52a0\u4e86 size 50M\u3001rotate 3 \u7b49\u3002\u7136\u540e\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">logrotate<\/span> <span class=\"token parameter variable\">-f<\/span> \/etc\/logrotate.d\/rsyslog<\/p>\n<p>\u7ed3\u679c&#xff1a; \u62a5\u9519 \u201cparent directory has insecure permissions\u201d&#xff0c;\u5e76\u4e14\u62a5 \u201cfailed to rename \/var\/log\/syslog to \/var\/log\/syslog.1: Permission denied\u201d\u3002\u539f\u56e0\u662f&#xff1a;\u4f7f\u7528 su syslog adm \u65f6&#xff0c;logrotate \u4f1a\u4ee5 syslog \u7528\u6237\u8eab\u4efd\u53bb\u8f6e\u8f6c&#xff0c;\u800c \/var\/log \u76ee\u5f55\u4e00\u822c\u662f root \u62e5\u6709\u3001755 \u6743\u9650&#xff0c;syslog \u7528\u6237\u6ca1\u6709\u6743\u9650\u5728\u4e0b\u9762\u91cd\u547d\u540d\u6216\u521b\u5efa\u6587\u4ef6&#xff0c;\u6240\u4ee5\u4f1a Permission denied&#xff1b;\u540c\u65f6\u7cfb\u7edf\u8ba4\u4e3a \/var\/log \u7684\u6743\u9650\u300c\u4e0d\u5b89\u5168\u300d&#xff0c;\u8981\u6c42\u8bbe\u7f6e su&#xff0c;\u5f62\u6210\u77db\u76fe\u3002<\/p>\n<p>\u6b63\u786e\u505a\u6cd5&#xff1a; \u5148\u4fee\u6b63 \/var\/log \u7684\u6743\u9650&#xff0c;\u518d\u53bb\u6389\u6240\u6709 su syslog adm&#xff0c;\u8ba9 logrotate \u4ee5 root \u8eab\u4efd\u6267\u884c\u8f6e\u8f6c\u3002\u6211\u6267\u884c\u4e86&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">755<\/span> \/var\/log<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> root:root \/var\/log<\/p>\n<p>\u7136\u540e\u518d\u6b21\u7f16\u8f91 \/etc\/logrotate.d\/rsyslog&#xff0c;\u5220\u6389\u7b2c\u4e00\u6bb5\u91cc syslog \u7684 su syslog adm&#xff0c;\u53ea\u4fdd\u7559 size\u3001rotate\u3001postrotate \u7b49&#xff0c;\u4fdd\u5b58\u540e\u518d\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">logrotate<\/span> <span class=\"token parameter variable\">-f<\/span> \/etc\/logrotate.d\/rsyslog<\/p>\n<p>\u7ed3\u679c&#xff1a; \u53c8\u62a5\u4e86 \u201cerror creating output file \/var\/log\/auth.log.1.gz: Permission denied\u201d\u3002\u539f\u56e0\u662f\u7b2c\u4e8c\u6bb5&#xff08;mail\u3001daemon\u3001kern\u3001auth \u7b49\u4e00\u5806\u65e5\u5fd7&#xff09;\u91cc\u6211\u8fd8\u7559\u7740 su syslog adm&#xff0c;\u540c\u6837\u5bfc\u81f4\u4ee5 syslog \u8eab\u4efd\u5728 \/var\/log \u4e0b\u521b\u5efa .gz \u6587\u4ef6\u65f6\u6743\u9650\u4e0d\u8db3\u3002<\/p>\n<p>\u4e8e\u662f\u6211\u518d\u6b21\u6253\u5f00\u914d\u7f6e&#xff0c;\u628a\u7b2c\u4e8c\u6bb5\u91cc\u7684 su syslog adm \u4e5f\u5220\u6389&#xff0c;\u8ba9\u4e24\u6bb5\u90fd\u7531 root \u6765\u8f6e\u8f6c\u3002\u6700\u7ec8\u4e24\u6bb5\u914d\u7f6e\u5927\u81f4\u5982\u4e0b&#xff08;\u4ec5\u4f5c\u53c2\u8003&#xff0c;\u4ee5\u4f60\u7cfb\u7edf\u5b9e\u9645\u4e3a\u51c6&#xff09;&#xff1a;<\/p>\n<p>\u7b2c\u4e00\u6bb5&#xff1a;\/var\/log\/syslog<\/p>\n<p>\/var\/log\/syslog<br \/>\n{<br \/>\n        rotate 3<br \/>\n        size 50M<br \/>\n        missingok<br \/>\n        notifempty<br \/>\n        delaycompress<br \/>\n        compress<br \/>\n        postrotate<br \/>\n                \/usr\/lib\/rsyslog\/rsyslog-rotate<br \/>\n        endscript<br \/>\n}<\/p>\n<p>\u7b2c\u4e8c\u6bb5&#xff1a;\u5176\u5b83\u7cfb\u7edf\u65e5\u5fd7&#xff08;\u4e0d\u518d\u5305\u542b su syslog adm&#xff09;<\/p>\n<p>\/var\/log\/mail.info<br \/>\n\/var\/log\/mail.warn<br \/>\n&#8230;&#xff08;\u7565&#xff09;<br \/>\n\/var\/log\/messages<br \/>\n{<br \/>\n        rotate 4<br \/>\n        weekly<br \/>\n        missingok<br \/>\n        notifempty<br \/>\n        compress<br \/>\n        delaycompress<br \/>\n        sharedscripts<br \/>\n        postrotate<br \/>\n                \/usr\/lib\/rsyslog\/rsyslog-rotate<br \/>\n        endscript<br \/>\n}<\/p>\n<p>\u4fdd\u5b58\u540e\u518d\u6b21\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">logrotate<\/span> <span class=\"token parameter variable\">-f<\/span> \/etc\/logrotate.d\/rsyslog<\/p>\n<p>\u7ed3\u679c&#xff1a; \u8fd9\u6b21\u6ca1\u6709\u4efb\u4f55\u62a5\u9519&#xff0c;\u547d\u4ee4\u6b63\u5e38\u7ed3\u675f\u3002\u8bf4\u660e logrotate \u5df2\u80fd\u6210\u529f\u8f6e\u8f6c syslog \u53ca\u5176\u5b83\u65e5\u5fd7&#xff0c;\u4e4b\u540e syslog \u8d85\u8fc7 50M \u4f1a\u81ea\u52a8\u8f6e\u8f6c&#xff0c;\u6700\u591a\u4fdd\u7559 3 \u4efd&#xff0c;\u4e0d\u4f1a\u518d\u65e0\u9650\u589e\u957f\u5360\u6ee1\u78c1\u76d8\u3002<\/p>\n<hr \/>\n<h3>\u4e03\u3001\u7b2c\u516d\u6b65&#xff1a;\u9a8c\u8bc1\u4e0e\u6536\u5c3e\u68c0\u67e5<\/h3>\n<p>\u6211\u505a\u4e86\u51e0\u9879\u68c0\u67e5&#xff0c;\u786e\u8ba4\u6574\u4f53\u72b6\u6001\u6b63\u5e38&#xff1a;<\/p>\n<p>1. \u786e\u8ba4 logrotate \u5b9a\u65f6\u4efb\u52a1\u5b58\u5728<\/p>\n<p><span class=\"token function\">ls<\/span> \/etc\/cron.daily\/logrotate<br \/>\nsystemctl status logrotate.timer<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726080910-6a65c0a680390.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7ed3\u679c&#xff1a; \u6587\u4ef6\u5b58\u5728&#xff0c;timer \u4e3a active (waiting)&#xff0c;\u4e0b\u6b21\u89e6\u53d1\u65f6\u95f4\u4e3a\u6b21\u65e5 00:00&#xff0c;\u8bf4\u660e\u6bcf\u5929\u4f1a\u81ea\u52a8\u6267\u884c\u4e00\u6b21 logrotate\u3002<\/p>\n<p>2. \u67e5\u770b\u78c1\u76d8\u4e0e syslog<\/p>\n<p><span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-h<\/span> \/<br \/>\n<span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-lh<\/span> \/var\/log\/syslog<\/p>\n<p>\u7ed3\u679c&#xff1a; \u78c1\u76d8\u663e\u793a\u5df2\u7528\u7ea6 6.9G&#xff0c;\u53ef\u7528\u7ea6 31G&#xff0c;\u4f7f\u7528\u7387\u7ea6 19%\u3002ls -lh \/var\/log\/syslog \u63d0\u793a No such file or directory&#xff0c;\u8fd9\u662f\u56e0\u4e3a\u521a\u624d\u6267\u884c logrotate \u65f6\u5df2\u7ecf\u628a\u5f53\u65f6\u7684 syslog \u8f6e\u8f6c\u6210\u4e86 syslog.1 \u7b49&#xff0c;\u65b0\u7684 syslog \u8981\u7b49 rsyslog \u4e0b\u6b21\u5199\u5165\u65f6\u624d\u4f1a\u521b\u5efa&#xff0c;\u5c5e\u4e8e\u6b63\u5e38\u73b0\u8c61\u3002\u82e5\u60f3\u7acb\u523b\u770b\u5230\u6587\u4ef6&#xff0c;\u53ef\u4ee5\u6267\u884c sudo systemctl restart rsyslog \u8ba9 rsyslog \u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\u3002<\/p>\n<p>3. \u5e94\u7528\u4e0e\u65e5\u5fd7\u94fe\u8def<\/p>\n<p>\u5e94\u7528\u5df2\u901a\u8fc7 systemd \u6539\u4e3a StandardOutput&#061;null \/ StandardError&#061;null&#xff0c;\u4e0d\u518d\u5411 syslog \u5199\u5e94\u7528\u65e5\u5fd7&#xff1b;syslog \u5df2\u901a\u8fc7 logrotate \u9650\u5236\u4e3a\u5355\u6587\u4ef6 50M\u3001\u4fdd\u7559 3 \u4efd\u3002\u4ece\u300c\u5e94\u7528\u63a7\u5236\u53f0 \u2192 journal \u2192 syslog\u300d\u8fd9\u6761\u94fe\u8def\u5df2\u7ecf\u88ab\u5207\u65ad&#xff0c;\u4e14 syslog \u81ea\u8eab\u4e5f\u4e0d\u4f1a\u518d\u65e0\u9650\u589e\u957f\u3002<\/p>\n<hr \/>\n<h3>\u516b\u3001\u6211\u5728\u5e94\u7528\u4fa7\u505a\u7684\u8865\u5145\u4f18\u5316&#xff08;\u53ef\u9009\u53c2\u8003&#xff09;<\/h3>\n<p>\u9664\u4e86\u4e0a\u8ff0\u670d\u52a1\u5668\u548c systemd \u4e0a\u7684\u64cd\u4f5c&#xff0c;\u6211\u5728\u5e94\u7528\u9879\u76ee\u91cc\u4e5f\u505a\u4e86\u4e24\u70b9\u914d\u7f6e&#xff0c;\u8fdb\u4e00\u6b65\u51cf\u5c11\u65e5\u5fd7\u5bf9\u78c1\u76d8\u548c IO \u7684\u5f71\u54cd&#xff1a;<\/p>\n<p>1. Logback&#xff1a;\u9ed8\u8ba4\u4e0d\u8f93\u51fa\u5230\u63a7\u5236\u53f0<\/p>\n<p>\u628a\u300c\u662f\u5426\u5199\u63a7\u5236\u53f0\u300d\u4ece\u300c\u53ea\u6709 prod \u624d\u4e0d\u5199\u300d\u6539\u6210\u4e86\u300c\u53ea\u6709 dev \u624d\u5199\u300d&#xff1a;\u5373\u9ed8\u8ba4&#xff08;\u4e0d\u8bbe profile&#xff09;\u6216\u751f\u4ea7\u73af\u5883\u65f6&#xff0c;root \u548c\u4e1a\u52a1 logger \u90fd\u4e0d\u6302 CONSOLE appender&#xff0c;\u53ea\u5199\u6587\u4ef6&#xff0c;\u5e76\u8bbe\u7f6e\u4e86 totalSizeCap\u3001maxHistory \u7b49\u9650\u5236&#xff1b;\u53ea\u6709\u663e\u5f0f\u52a0 spring.profiles.active&#061;dev \u65f6\u624d\u5199\u63a7\u5236\u53f0\u3002\u8fd9\u6837\u5728\u670d\u52a1\u5668\u4e0a\u4e0d\u8bbe profile \u65f6&#xff0c;\u5e94\u7528\u672c\u8eab\u4e5f\u4e0d\u4f1a\u518d\u5f80 stdout \u6253\u65e5\u5fd7&#xff0c;\u53cc\u91cd\u4fdd\u9669\u3002<\/p>\n<p>2. application.properties \u4e0e\u751f\u4ea7\u5bf9\u9f50<\/p>\n<p>\u5728\u5171\u7528\u7684 application.properties \u91cc\u628a\u65e5\u5fd7\u7ea7\u522b\u6539\u4e3a WARN\u3001\u5b9a\u65f6\u4efb\u52a1\u7ebf\u7a0b\u6c60\u8c03\u5c0f\u3001\u65e5\u5fd7\u6e05\u7406\u4fdd\u7559\u5929\u6570\u7f29\u77ed\u7b49&#xff0c;\u548c\u4e4b\u524d\u751f\u4ea7\u73af\u5883\u914d\u7f6e\u4fdd\u6301\u4e00\u81f4&#xff0c;\u51cf\u5c11\u65e5\u5fd7\u91cf\u548c CPU \u5360\u7528\u3002\u8fd9\u6837\u65e0\u8bba\u662f\u5426\u5355\u72ec\u542f\u7528 prod profile&#xff0c;\u670d\u52a1\u5668\u4e0a\u7684\u884c\u4e3a\u90fd\u66f4\u53ef\u63a7\u3002<\/p>\n<p>\u8fd9\u4e24\u90e8\u5206\u5c5e\u4e8e\u300c\u5e94\u7528\u5c42\u4f18\u5316\u300d&#xff0c;\u4e0d\u5f71\u54cd\u524d\u9762\u300c\u6e05\u7a7a syslog &#043; \u6539 systemd &#043; \u914d logrotate\u300d\u7684\u4e3b\u7ebf\u64cd\u4f5c&#xff1b;\u82e5\u4f60\u6682\u65f6\u4e0d\u60f3\u6539\u5e94\u7528&#xff0c;\u53ea\u505a\u670d\u52a1\u5668\u548c systemd \u90e8\u5206\u4e5f\u80fd\u89e3\u51b3 syslog \u5360\u6ee1\u7684\u95ee\u9898\u3002<\/p>\n<hr \/>\n<h3>\u4e5d\u3001\u6574\u4f53\u7ed3\u679c\u5c0f\u7ed3<\/h3>\n<table>\n<tr>\u9636\u6bb5\u6211\u505a\u7684\u64cd\u4f5c\u7ed3\u679c<\/tr>\n<tbody>\n<tr>\n<td>\u5b9a\u4f4d<\/td>\n<td>df\u3001du \u4ece\u6839\u76ee\u5f55\u67e5\u5230 \/var\/log&#xff0c;\u518d\u67e5\u5230 syslog\/syslog.1<\/td>\n<td>\u786e\u8ba4 syslog \u5360\u7ea6 32G&#xff0c;\u662f\u5360\u6ee1\u6839\u56e0<\/td>\n<\/tr>\n<tr>\n<td>\u91ca\u653e\u7a7a\u95f4<\/td>\n<td>truncate \u6e05\u7a7a syslog&#xff0c;\u5220\u9664 syslog.1 \u53ca .gz<\/td>\n<td>\u53ef\u7528\u7a7a\u95f4\u4ece 0 \u6062\u590d\u5230\u7ea6 31G<\/td>\n<\/tr>\n<tr>\n<td>\u5207\u65ad\u6765\u6e90<\/td>\n<td>systemd \u670d\u52a1\u4e2d StandardOutput\/Error \u6539\u4e3a null<\/td>\n<td>\u5e94\u7528\u8f93\u51fa\u4e0d\u518d\u8fdb journal\/syslog<\/td>\n<\/tr>\n<tr>\n<td>\u9650\u5236 syslog<\/td>\n<td>\u4fee\u6b63 \/var\/log \u6743\u9650&#xff0c;\u53bb\u6389 logrotate \u4e2d\u4e24\u5904 su&#xff0c;\u914d\u7f6e size 50M\u3001rotate 3<\/td>\n<td>logrotate \u6267\u884c\u6210\u529f&#xff0c;syslog \u4e0d\u518d\u65e0\u9650\u589e\u957f<\/td>\n<\/tr>\n<tr>\n<td>\u9a8c\u8bc1<\/td>\n<td>\u67e5\u770b df\u3001logrotate.timer\u3001cron.daily<\/td>\n<td>\u78c1\u76d8 19%&#xff0c;\u5b9a\u65f6\u8f6e\u8f6c\u6b63\u5e38<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6700\u7ec8\u5728\u4e0d\u6362\u673a\u3001\u4e0d\u6269\u5bb9\u7684\u524d\u63d0\u4e0b&#xff0c;\u89e3\u51b3\u4e86\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u95ee\u9898&#xff0c;\u5e76\u907f\u514d\u4e86\u590d\u53d1\u3002\u82e5\u4f60\u4e5f\u662f Java\/Spring Boot &#043; systemd \u90e8\u7f72&#xff0c;\u9047\u5230\u7c7b\u4f3c\u300c\u7cfb\u7edf\u76d8 100%\u3001\/var\/log \u5de8\u5927\u300d\u7684\u60c5\u51b5&#xff0c;\u53ef\u4ee5\u6309\u4e0a\u8ff0\u987a\u5e8f&#xff1a;\u5148\u67e5 du \u5b9a\u4f4d\u5230 syslog&#xff0c;\u518d\u6e05\u7a7a\u91ca\u653e\u7a7a\u95f4&#xff0c;\u6539 systemd \u5173\u6389 journal \u8f93\u51fa&#xff0c;\u6700\u540e\u7528 logrotate \u505a\u5927\u5c0f\u8f6e\u8f6c\u5e76\u6ce8\u610f\u6743\u9650\u4e0e su \u7684\u5751\u3002<\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u95ee\u9898\u80cc\u666f\u4e0e\u73b0\u8c61<br \/>\n\u6211\u7684\u4e00\u53f0\u4e91\u670d\u52a1\u5668\u914d\u7f6e\u4e3a 4 \u6838 CPU\u30014G \u5185\u5b58\u300140G \u7cfb\u7edf\u76d8&#xff0c;\u4e0a\u9762\u8dd1\u4e86\u4e00\u4e2a Java Spring Boot \u5e94\u7528&#xff0c;\u7528 systemd \u505a\u670d\u52a1\u7ba1\u7406\u3002\u67d0\u5929\u5728\u4e91\u63a7\u5236\u53f0\u770b\u5230\u300c\u7528\u91cf\u4e0e\u76d1\u63a7\u300d\u91cc\u51fa\u73b0\u544a\u8b66&#xff1a;<br \/>\n\u7cfb\u7edf\u76d8\u4f7f\u7528\u7387 100%&#xff0c;40G \u5168\u90e8\u7528\u6ee1&#xff0c;\u53ef\u7528\u7a7a\u95f4\u4e3a 0&#xff1b;CPU \u4f7f\u7528\u7387 100%&#xff1b;\u5185\u5b58 \u7ea6 67%&#xff1b;\u7cfb\u7edf\u76d8 IO \u5199\u5165\u7ea6 5MB\/s&amp;#xff0c<\/p>\n","protected":false},"author":2,"featured_media":84679,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[84,43,44],"topic":[],"class_list":["post-84681","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-android","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/84681.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u95ee\u9898\u80cc\u666f\u4e0e\u73b0\u8c61 \u6211\u7684\u4e00\u53f0\u4e91\u670d\u52a1\u5668\u914d\u7f6e\u4e3a 4 \u6838 CPU\u30014G \u5185\u5b58\u300140G \u7cfb\u7edf\u76d8&#xff0c;\u4e0a\u9762\u8dd1\u4e86\u4e00\u4e2a Java Spring Boot \u5e94\u7528&#xff0c;\u7528 systemd \u505a\u670d\u52a1\u7ba1\u7406\u3002\u67d0\u5929\u5728\u4e91\u63a7\u5236\u53f0\u770b\u5230\u300c\u7528\u91cf\u4e0e\u76d1\u63a7\u300d\u91cc\u51fa\u73b0\u544a\u8b66&#xff1a; \u7cfb\u7edf\u76d8\u4f7f\u7528\u7387 100%&#xff0c;40G \u5168\u90e8\u7528\u6ee1&#xff0c;\u53ef\u7528\u7a7a\u95f4\u4e3a 0&#xff1b;CPU \u4f7f\u7528\u7387 100%&#xff1b;\u5185\u5b58 \u7ea6 67%&#xff1b;\u7cfb\u7edf\u76d8 IO \u5199\u5165\u7ea6 5MB\/s&amp;#xff0c\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/84681.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-26T08:09:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726080910-6a65c0a64bd64.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/84681.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/84681.html\",\"name\":\"\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-26T08:09:11+00:00\",\"dateModified\":\"2026-07-26T08:09:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/84681.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/84681.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/84681.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/84681.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u95ee\u9898\u80cc\u666f\u4e0e\u73b0\u8c61 \u6211\u7684\u4e00\u53f0\u4e91\u670d\u52a1\u5668\u914d\u7f6e\u4e3a 4 \u6838 CPU\u30014G \u5185\u5b58\u300140G \u7cfb\u7edf\u76d8&#xff0c;\u4e0a\u9762\u8dd1\u4e86\u4e00\u4e2a Java Spring Boot \u5e94\u7528&#xff0c;\u7528 systemd \u505a\u670d\u52a1\u7ba1\u7406\u3002\u67d0\u5929\u5728\u4e91\u63a7\u5236\u53f0\u770b\u5230\u300c\u7528\u91cf\u4e0e\u76d1\u63a7\u300d\u91cc\u51fa\u73b0\u544a\u8b66&#xff1a; \u7cfb\u7edf\u76d8\u4f7f\u7528\u7387 100%&#xff0c;40G \u5168\u90e8\u7528\u6ee1&#xff0c;\u53ef\u7528\u7a7a\u95f4\u4e3a 0&#xff1b;CPU \u4f7f\u7528\u7387 100%&#xff1b;\u5185\u5b58 \u7ea6 67%&#xff1b;\u7cfb\u7edf\u76d8 IO \u5199\u5165\u7ea6 5MB\/s&amp;#xff0c","og_url":"https:\/\/www.wsisp.com\/helps\/84681.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-26T08:09:11+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726080910-6a65c0a64bd64.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/84681.html","url":"https:\/\/www.wsisp.com\/helps\/84681.html","name":"\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-26T08:09:11+00:00","dateModified":"2026-07-26T08:09:11+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/84681.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/84681.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/84681.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u7cfb\u7edf\u76d8\u88ab syslog \u5360\u6ee1\u7684\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u8bb0\u5f55"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/84681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=84681"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/84681\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/84679"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=84681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=84681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=84681"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=84681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}