{"id":46094,"date":"2023-04-19T09:44:38","date_gmt":"2023-04-19T01:44:38","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=46094"},"modified":"2023-04-19T09:44:38","modified_gmt":"2023-04-19T01:44:38","slug":"linux-sys-log","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-sys-log.html","title":{"rendered":"\u5728 Linux \u4e0a\u914d\u7f6e\u4e00\u4e2a syslog \u670d\u52a1\u5668"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nSyslog\u670d\u52a1\u5668\u53ef\u4ee5\u7528\u4f5c\u4e00\u4e2a\u7f51\u7edc\u4e2d\u7684\u65e5\u5fd7\u76d1\u63a7\u4e2d\u5fc3\uff0c\u6240\u6709\u80fd\u591f\u901a\u8fc7\u7f51\u7edc\u6765\u53d1\u9001\u65e5\u5fd7\u7684\u8bbe\u65bd\uff08\u5305\u542b\u4e86Linux\u6216Windows\u670d\u52a1\u5668\uff0c\u8def\u7531\u5668\uff0c\u4ea4\u6362\u673a\u4ee5\u53ca\u5176\u4ed6\u4e3b\u673a\uff09\u90fd\u53ef\u4ee5\u628a\u65e5\u5fd7\u53d1\u9001\u7ed9\u5b83\u3002 \u901a\u8fc7\u8bbe\u7f6e\u4e00\u4e2asyslog\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u5c06\u4e0d\u540c\u8bbe\u65bd\/\u4e3b\u673a\u53d1\u9001\u7684\u65e5\u5fd7\uff0c\u8fc7\u6ee4\u548c\u5408\u5e76\u5230\u4e00\u4e2a\u72ec\u7acb\u7684\u4f4d\u7f6e\uff0c\u8fd9\u6837\u4f7f\u5f97\u4f60\u66f4\u5bb9\u6613\u5730\u67e5\u770b\u548c\u83b7\u53d6\u91cd\u8981\u7684\u65e5\u5fd7\u6d88\u606f\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

Rsyslog \u4f5c\u4e3a\u6807\u51c6\u7684syslog\u5b88\u62a4\u8fdb\u7a0b\uff0c\u9884\u88c5\u5728\u4e86\u5927\u591a\u6570\u7684Linux\u53d1\u884c\u7248\u4e2d\u3002\u5728\u5ba2\u6237\u7aef\/\u670d\u52a1\u5668\u67b6\u6784\u7684\u914d\u7f6e\u4e0b\uff0crsyslog\u540c\u65f6\u626e\u6f14\u4e86\u4e24\u79cd\u89d2\u8272\uff1a1.\u4f5c\u4e3a\u4e00\u4e2asyslog\u670d\u52a1\u5668\uff0crsyslog\u53ef\u4ee5\u6536\u96c6\u6765\u81ea\u5176\u4ed6\u8bbe\u65bd\u7684\u65e5\u5fd7\u4fe1\u606f\uff1b2.\u4f5c\u4e3a\u4e00\u4e2asyslog\u5ba2\u6237\u7aef\uff0crsyslog\u53ef\u4ee5\u5c06\u5176\u5185\u90e8\u7684\u65e5\u5fd7\u4fe1\u606f\u4f20\u8f93\u5230\u8fdc\u7a0b\u7684syslog\u670d\u52a1\u5668\u3002<\/p>\n

\u5728\u6b64\uff0c\u6211\u4eec\u6f14\u793a\u4e86\u5728linux\u4e0a\u5982\u4f55\u901a\u8fc7rsyslog\u6765\u914d\u7f6e\u4e00\u4e2a\u4e2d\u5fc3\u5316syslog\u670d\u52a1\u5668\u3002 \u5728\u8fdb\u5165\u8be6\u89e3\u4e4b\u524d\uff0c\u5148\u6e29\u4e60\u4e00\u4e0bsyslog\u6807\u51c6\u3002\n<\/p>\n

syslog\u6807\u51c6\u57fa\u7840<\/strong><\/div>\n

\n\u5f53\u901a\u8fc7syslog\u673a\u5236\u6765\u6536\u96c6\u65e5\u5fd7\u65f6\uff0c\u67093\u4e2a\u5fc5\u987b\u8981\u8003\u8651\u5230\u7684\u91cd\u8981\u4e8b\u60c5\uff1a
\n\u2022\u8bbe\u65bd\u5c42\u7ea7: \u76d1\u542c\u4f55\u79cd\u7c7b\u578b\u7684\u8fdb\u7a0b
\n\u2022\u4e25\u91cd\u6027 \uff08\u4f18\u5148\uff09 \u7ea7\u522b: \u6536\u96c6\u4f55\u79cd\u7ea7\u522b\u7684\u65e5\u5fd7\u6d88\u606f
\n\u2022\u76ee\u6807: \u53d1\u9001\u6216\u8bb0\u5f55\u65e5\u5fd7\u6d88\u606f\u5230\u4f55\u5904<\/p>\n

\u73b0\u5728\u6211\u4eec\u66f4\u52a0\u6df1\u5165\u5730\u4e86\u89e3\u4e00\u4e0b\u914d\u7f6e\u662f\u5982\u4f55\u5b9a\u4e49\u7684\u3002<\/p>\n

\u8bbe\u65bd\u5c42\u7ea7\u5b9a\u4e49\u4e86\u4e00\u79cd\u7528\u6765\u5bf9\u5185\u90e8\u7cfb\u7edf\u8fdb\u7a0b\u8fdb\u884c\u5206\u7c7b\u7684\u65b9\u6cd5\uff0clinux\u4e2d\u7684\u4e00\u4e9b\u5e38\u89c1\u7684\u8bbe\u65bd\u5305\u62ec:
\n\u2022auth: \u8eab\u4efd\u9a8c\u8bc1\u76f8\u5173\u7684\u6d88\u606f\uff08\u767b\u5f55\u65f6\uff09
\n\u2022cron: \u8fdb\u7a0b\u6216\u5e94\u7528\u8c03\u5ea6\u76f8\u5173\u7684\u6d88\u606f
\n\u2022daemon: \u5b88\u62a4\u8fdb\u7a0b\u76f8\u5173\u7684\u6d88\u606f\uff08\u5185\u90e8\u670d\u52a1\u5668\uff09
\n\u2022kernel: \u5185\u6838\u76f8\u5173\u7684\u6d88\u606f
\n\u2022mail: \u5185\u90e8\u90ae\u4ef6\u670d\u52a1\u5668\u76f8\u5173\u7684\u6d88\u606f
\n\u2022syslog: syslog \u5b88\u62a4\u8fdb\u7a0b\u672c\u8eab\u76f8\u5173\u7684\u6d88\u606f
\n\u2022lpr: \u6253\u5370\u670d\u52a1\u76f8\u5173\u7684\u6d88\u606f
\n\u2022local0 - local7: \u7528\u6237\u81ea\u5b9a\u4e49\u7684\u6d88\u606f \uff08local7 \u901a\u5e38\u88abCisco \u548c Windows \u670d\u52a1\u5668 \u4f7f\u7528\uff09<\/p>\n

\u4e25\u91cd\u6027\uff08\u4f18\u5148\uff09\u7ea7\u522b\u6709\u56fa\u5b9a\u7684\u6807\u51c6\u7f29\u5199\u548c\u6307\u4ee3\u7684\u503c\uff0c\u5176\u4e2d\u7684\u6570\u5b577\u5177\u6709\u6700\u9ad8\u7684\u7ea7\u522b\uff0c\u8fd9\u4e9b\u7ea7\u522b\u5305\u542b\u4e86\uff1a
\n\u2022emerg: Emergency\uff08\u7d27\u6025\uff09- 0
\n\u2022alert: Alerts \uff08\u62a5\u8b66\uff09- 1
\n\u2022crit: Critical (\u5173\u952e\uff09- 2
\n\u2022err: Errors \uff08\u9519\u8bef\uff09- 3
\n\u2022warn: Warnings \uff08\u8b66\u544a\uff09- 4
\n\u2022notice: Notification \uff08\u901a\u77e5\uff09- 5
\n\u2022info: Information \uff08\u6d88\u606f\uff09- 6
\n\u2022debug: Debugging \uff08\u8c03\u8bd5\uff09- 7<\/p>\n

\u6700\u540e\uff0c\u76ee\u6807\u8bed\u53e5\u4f1a\u8ba9\u4e00\u4e2asyslog\u5ba2\u6237\u7aef\u6765\u6267\u884c\u4ee5\u4e0b\u4e09\u4e2a\u4efb\u52a1\u4e4b\u4e00\uff1a
\n1.\u4fdd\u5b58\u65e5\u5fd7\u6d88\u606f\u5230\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\uff1b
\n2.\u901a\u8fc7TCP\/UDP\u5c06\u6d88\u606f\u8def\u7531\u5230\u8fdc\u7a0b\u7684syslog\u670d\u52a1\u5668\u4e2d\uff1b
\n3.\u5c06\u5176\u53d1\u9001\u5230\u4e00\u4e2a\u6807\u51c6\u8f93\u51fa\u4e2d\uff0c\u4f8b\u5982\u63a7\u5236\u53f0\u3002<\/p>\n

\u5728 rsyslog\u91cc, syslog\u7684\u914d\u7f6e\u662f\u57fa\u4e8e\u4ee5\u4e0b\u6a21\u5f0f\u8fdb\u884c\u7ed3\u6784\u5316\u7684\u3002<\/p>\n

\r\n1.[facility-level].[severity-level]  [destination]\r\n\r\n<\/pre>\n
\u5728Linux\u4e2d\u914d\u7f6eRsyslog<\/strong><\/div>\n

\u5728\u6211\u4eec\u7406\u89e3syslog\u4e4b\u540e\uff0c\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7rsyslog\u6765\u5c06\u4e00\u4e2aLinux\u670d\u52a1\u5668\u914d\u7f6e\u4e3a\u4e00\u4e2a\u4e2d\u5fc3syslog\u670d\u52a1\u5668\u4e86\uff0c\u53e6\u5916\u6211\u4eec\u4e5f\u5c06\u770b\u5230\u5982\u4f55\u5728\u4e00\u4e2aWindows\u7684\u7cfb\u7edf\u4e0a\u914d\u7f6e\u4e00\u4e2asyslog\u5ba2\u6237\u7aef\u6765\u53d1\u9001\u5185\u90e8\u65e5\u5fd7\u5230\u8be5syslog\u670d\u52a1\u5668\u4e2d\u3002<\/p>\n

\u7b2c1\u6b65: \u521d\u59cb\u5316\u7cfb\u7edf\u9700\u6c42<\/strong><\/div>\n

\u8981\u5c06linux\u4e3b\u673a\u8bbe\u7f6e\u4e3a\u4e00\u4e2a\u4e2d\u592e\u65e5\u5fd7\u670d\u52a1\u5668\uff0c \u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u5206\u79bb\u7684 \/var \u5206\u533a\uff0c\u5e76\u5206\u914d\u8db3\u591f\u5927\u7684\u78c1\u76d8\u7a7a\u95f4\u6216\u8005\u521b\u5efa\u4e00\u4e2a\u7279\u6b8a\u7684LVM\u5377\u7ec4\u3002\u8fd9\u6837\u5c31\u4f1a\u4f7f\u5f97syslog\u670d\u52a1\u5668\u80fd\u591f\u627f\u62c5\u5728\u65e5\u79ef\u6708\u7d2f\u6536\u96c6\u65e5\u5fd7\u6240\u5e26\u6765\u7684\u6f5c\u5728\u589e\u957f\u3002<\/p>\n

\u7b2c2\u6b65: \u8ba9rsyslog \u540e\u53f0\u8fdb\u7a0b\u751f\u6548<\/strong><\/div>\n

rsyslog\u5b88\u62a4\u8fdb\u7a0b\u6765\u81ea\u4e8e\u5f53\u524d\u7684linux\u53d1\u5e03\u7248\u672c\u7684\u9884\u88c5\u6a21\u5757\uff0c\u4f46\u662f\u9ed8\u8ba4\u5e76\u6ca1\u6709\u542f\u52a8\u3002\u4e3a\u4e86\u80fd\u591f\u8ba9rsyslog\u5b88\u62a4\u8fdb\u7a0b\u80fd\u591f\u63a5\u53d7\u5916\u90e8\u7684\u6d88\u606f\uff0c\u9700\u8981\u7f16\u8f91\u5176\u914d\u7f6e\u6587\u4ef6\/etc\/rsyslog.conf.<\/p>\n

\u6253\u5f00\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\uff0c\u67e5\u627e\u5230\u4e0b\u9762\u7684\u4e24\u884c\u6240\u5728\u7684\u4f4d\u7f6e\uff0c\u901a\u8fc7\u5220\u9664\u5176\u884c\u9996\u7684#\u5b57\u7b26\u6765\u53d6\u6d88\u6ce8\u91ca\u3002\n<\/p>\n

1.$ModLoad imudp\r\n2.$UDPServerRun 514\r\n<\/pre>\n

\u8fd9\u4f1a\u4f7f\u5f97rsysolog\u5b88\u62a4\u8fdb\u7a0b\u80fd\u591f\u5728UDP\u7aef\u53e3514\u4e0a\u63a5\u53d7\u65e5\u5fd7\u6d88\u606f\u4e86---UDP\u662f\u4e00\u79cd\u6bd4TCP\u901f\u5ea6\u5feb\uff0c\u4f46\u662f\u5e76\u4e0d\u5177\u6709TCP\u4e00\u6837\u7684\u6570\u636e\u6d41\u7684\u53ef\u9760\u6027\u3002\u6240\u4ee5\u5982\u679c\u4f60\u9700\u8981\u4f7f\u7528\u53ef\u9760\u7684\u4f20\u9001\u673a\u5236\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7\u53d6\u6d88\u4ee5\u4e0b\u884c\u7684\u6ce8\u91ca\u3002<\/p>\n

1.$ModLoad imtcp\r\n2.$InputTCPServerRun 514 \r\n<\/pre>\n

\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cTCP\u548cUDP\u53ef\u4ee5\u88ab\u540c\u65f6\u751f\u6548\u6765\u76d1\u542cTCP\/UDP \u8fde\u63a5\u3002<\/p>\n

\u7b2c3\u6b65\uff1a\u521b\u5efa\u65e5\u5fd7\u63a5\u6536\u6a21\u677f<\/strong><\/div>\n

\u63a5\u4e0b\u6765\u7684\u8fd9\u6b65\uff0c\u9700\u8981\u6211\u4eec\u6765\u4e3a\u8fdc\u7a0b\u6d88\u606f\u521b\u5efa\u6a21\u677f\uff0c\u5e76\u544a\u77e5rsyslog\u5b88\u62a4\u8fdb\u7a0b\u5982\u4f55\u8bb0\u5f55\u4ece\u5176\u4ed6\u5ba2\u6237\u7aef\u673a\u5668\u6240\u63a5\u53d7\u5230\u7684\u6d88\u606f\u3002<\/p>\n

\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6765\u6253\u5f00 \/etc\/rsyslog.conf\uff0c\u7136\u540e\u5728GLOBAL DIRECTIVE\u5757\u524d\u8ffd\u52a0\u4ee5\u4e0b\u7684\u6a21\u677f\u3002\n<\/p>\n

1.$template RemoteLogs,\"\/var\/log\/%HOSTNAME%\/%PROGRAMNAME%.log\" *\r\n2.*.*  ?RemoteLogs\r\n3.& ~\r\n<\/pre>\n

\u5728\u6b64\u5bf9\u8be5\u6a21\u677f\u8fdb\u884c\u7b80\u5355\u89e3\u91ca\uff0c$template RemoteLogs\uff08\u8fd9\u91cc\u201cRemoteLogs\u201d \u5b57\u7b26\u4e32\u53ef\u4ee5\u4e3a\u4efb\u4f55\u5176\u4ed6\u7684\u63cf\u8ff0\u6027\u7684\u540d\u79f0\uff09\u6307\u4ee4\u4f7frsyslog\u540e\u53f0\u8fdb\u7a0b\u5c06\u65e5\u5fd7\u6d88\u606f\u5199\u5230\/var\/log\u4e0b\u7684\u5355\u72ec\u7684\u672c\u5730\u65e5\u5fd7\u6587\u4ef6\u4e2d\uff0c\u5176\u4e2d\u65e5\u5fd7\u6587\u4ef6\u7684\u540d\u79f0\u662f\u57fa\u4e8e\u8fdc\u7a0b\u65e5\u5fd7\u53d1\u9001\u673a\u5668\u7684\u4e3b\u673a\u540d\u4ee5\u53ca\u751f\u6210\u8be5\u65e5\u5fd7\u7684\u5e94\u7528\u7a0b\u5e8f\u540d\u8fdb\u884c\u5b9a\u4e49\u7684\u3002\u5176\u4e2d\u7b2c\u4e8c\u884c\u6697\u793a\u4e86\u6211\u4eec\u5c06RemoteLogs\u6a21\u677f\u5e94\u7528\u5230\u6240\u6709\u63a5\u6536\u5230\u7684\u65e5\u5fd7\u4e0a\u3002<\/p>\n

\u7b26\u53f7\"& ~\"\u8868\u793a\u4e86\u4e00\u4e2a\u91cd\u5b9a\u5411\u89c4\u5219\uff0c\u88ab\u7528\u6765\u544a\u77e5rsyslog\u5b88\u62a4\u8fdb\u7a0b\u505c\u6b62\u5bf9\u65e5\u5fd7\u6d88\u606f\u7684\u8fdb\u4e00\u6b65\u5904\u7406\uff0c\u5e76\u4e14\u4e0d\u8981\u5728\u672c\u5730\u5199\u5165\u3002\u5982\u679c\u6ca1\u6709\u4f7f\u7528\u8be5\u91cd\u5b9a\u5411\u89c4\u5219\uff0c\u90a3\u4e48\u6240\u6709\u7684\u8fdc\u7a0b\u6d88\u606f\u90fd\u4f1a\u5728\u5199\u5165\u4e0a\u8ff0\u63cf\u8ff0\u7684\u65e5\u5fd7\u6587\u4ef6\u4e4b\u5916\u540c\u65f6\u88ab\u5199\u5165\u5230\u672c\u5730\u65e5\u5fd7\u6587\u4ef6\uff0c\u8fd9\u5c31\u610f\u5473\u7740\u65e5\u5fd7\u6d88\u606f\u5b9e\u9645\u4e0a\u88ab\u5199\u4e86\u4e24\u6b21\u3002\u4f7f\u7528\u8be5\u89c4\u5219\u7684\u53e6\u5916\u4e00\u4e2a\u7ed3\u679c\u5c31\u662fsyslog\u670d\u52a1\u5668\u672c\u8eab\u7684\u65e5\u5fd7\u6d88\u606f\u53ea\u4f1a\u88ab\u4ee5\u8be5\u673a\u5668\u4e3b\u673a\u540d\u547d\u540d\u7684\u4e13\u6709\u6587\u4ef6\u4e2d\u3002<\/p>\n

\u5982\u679c\u4f60\u60f3\u8981\u7684\u8bdd\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u6a21\u5f0f\u5bf9\u7279\u5b9a\u7684\u8bbe\u5907\u6216\u4e25\u91cd\u6027\u7ea7\u522b\u4f7f\u7528\u65b0\u7684\u6a21\u677f\u76f4\u63a5\u6765\u8bb0\u5f55\u65e5\u5fd7\u6d88\u606f\u3002\n<\/p>\n

\r\n1.[facility-level].[severity-level]    ?RemoteLogs\r\n\r\n<\/pre>\n

\u4f8b\u5982\uff1a<\/p>\n

\u5c06\u5168\u90e8\u4f18\u5148\u7ea7\u522b\u7684\u6240\u6709\u5185\u90e8\u7528\u6237\u9a8c\u8bc1\u6d88\u606f\u6307\u5b9a\u4e3aRemoteLogs\u6a21\u677f\uff1a\n<\/p>\n

1.authpriv.*   ?RemoteLogs <\/pre>\n

\u5c06\u6240\u6709\u7cfb\u7edf\u8fdb\u7a0b\u4e2d\u9664\u5f00mail\u3001\u7528\u6237\u9a8c\u8bc1\u548ccron\u6d88\u606f\u4e4b\u5916\u7684\u8fdb\u7a0b\u4ea7\u751f\u7684\u6d88\u606f\u7ea7\u522b\u7684\u65e5\u5fd7\u6307\u5b9a\u4e3aRemoteLogs\u6a21\u677f\uff1a<\/p>\n

\r\n1.*.info,mail.none,authpriv.none,cron.none    ?RemoteLogs\r\n\r\n<\/pre>\n

\u5982\u679c\u6211\u4eec\u60f3\u8981\u5c06\u6240\u6709\u4ece\u8fdc\u7a0b\u5ba2\u6237\u7aef\u63a5\u53d7\u5230\u7684\u6d88\u606f\u5199\u5165\u5230\u4e00\u4e2a\u4ee5\u5b83\u4eec\u7684IP\u5730\u5740\u547d\u540d\u7684\u5355\u4e2a\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u7684\u6a21\u677f\u3002\u5728\u6b64\u6211\u4eec\u4e3a\u8be5\u6a21\u677f\u8d4b\u4e88\u4e86\u201cIpTemplate\u201d\u540d\u79f0\u3002<\/p>\n

1.$template IpTemplate,\"\/var\/log\/%FROMHOST-IP%.log\" \r\n2.*.*  ?IpTemplate \r\n3.& ~ \r\n<\/pre>\n

\u5728\u6211\u4eec\u542f\u7528rsyslog\u5b88\u62a4\u8fdb\u7a0b\u5e76\u7f16\u8f91\u597d\u914d\u7f6e\u6587\u4ef6\u4e4b\u540e\uff0c\u9700\u8981\u91cd\u542f\u8be5\u5b88\u62a4\u8fdb\u7a0b\u3002<\/p>\n

\u5728 Debian\uff0cUbuntu \u6216 CentOS\/RHEL 6\u4e2d\uff1a\n<\/p>\n

1.$ sudo service rsyslog restart <\/pre>\n

\u5728 Fedora \u6216 CentOS\/RHEL 7\u4e2d\uff1a<\/p>\n

1.$ sudo systemctl restart rsyslog <\/pre>\n

\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7netstat\u547d\u4ee4\u6765\u9a8c\u8bc1rsyslog\u5b88\u62a4\u8fdb\u7a0b\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n

1. $ sudo netstat -tulpn | grep rsyslog <\/pre>\n

\u5728UDP\u76d1\u542c\u7aef\u53e3\u4e0b\u5de5\u4f5c\u7684rsyslog\u5b88\u62a4\u8fdb\u7a0b\u4f1a\u6709\u7c7b\u4f3c\u4e0b\u9762\u7684\u8f93\u51fa\u3002<\/p>\n

1.udp     0 0    0.0.0.0:514    0.0.0.0:*      551\/rsyslogd \r\n2.udp6    0 0    :::514         :::*           551\/rsyslogd \r\n<\/pre>\n

\u5982\u679crsyslog\u5b88\u62a4\u8fdb\u7a0b\u88ab\u8bbe\u7f6e\u5728TCP\u8fde\u63a5\u7aef\u53e3\uff0c\u90a3\u4e48\u5e94\u8be5\u6709\u7c7b\u4f3c\u4e0b\u9762\u6240\u793a\u7684\u8f93\u51fa\u3002<\/p>\n

1.tcp     0 0     0.0.0.0:514   0.0.0.0:*     LISTEN    1891\/rsyslogd \r\n2.tcp6    0 0     :::514        :::*          LISTEN    1891\/rsyslogd\r\n<\/pre>\n
\u53d1\u9001Windows\u65e5\u5fd7\u5230\u4e00\u4e2a\u8fdc\u7a0b\u7684rsyslog\u670d\u52a1\u5668<\/strong><\/div>\n

\u8981\u5c06\u4e00\u4e2aWindows\u5ba2\u6237\u7aef\u7684\u65e5\u5fd7\u6d88\u606f\u8f6c\u53d1\u5230\u6211\u4eec\u7684rsyslog\u670d\u52a1\u5668\uff0c\u9700\u8981\u4e00\u4e2a\u5b89\u88c5 Windows syslog \u4ee3\u7406\u3002\u5f53\u7136\uff0c\u6709\u8bb8\u591a\u7684syslog\u4ee3\u7406\u53ef\u4ee5\u5728windows\u4e0a\u8fd0\u884c\uff0c\u5728\u6b64\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u81ea\u7531\u8f6f\u4ef6\u7a0b\u5e8f Datagram SyslogAgent.<\/p>\n

\u5728\u4e0b\u8f7d\u5b89\u88c5\u8be5syslog\u4ee3\u7406\u540e\uff0c\u9700\u8981\u5c06\u5176\u914d\u7f6e\u4e3a\u4f5c\u4e3a\u670d\u52a1\u8fd0\u884c\u3002\u6307\u5b9a\u4f7f\u7528\u4f55\u79cd\u534f\u8bae\u6765\u53d1\u9001\u6570\u636e\uff0c\u4ee5\u53ca\u8fdc\u7a0brsyslog\u670d\u52a1\u5668\u7684IP\u5730\u5740\u548c\u7aef\u53e3\uff0c\u6700\u540e\u6307\u5b9a\u5e94\u8be5\u4f20\u8f93\u7684\u4e8b\u4ef6\u65e5\u5fd7\u7c7b\u578b\uff0c\u5982\u4e0b\u6240\u793a\u3002\n<\/p>\n

\"\"<\/p>\n

\u5728\u6211\u4eec\u5b8c\u6210\u6240\u6709\u7684\u8fd9\u4e9b\u914d\u7f6e\u4e4b\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u542f\u52a8\u8be5\u670d\u52a1\u5e76\u4e14\u5728\u4e2d\u592ersyslog\u670d\u52a1\u5668\u4e2d\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177tail -f\u6765\u67e5\u770b\u65e5\u5fd7\u6587\u4ef6\u4e86\u3002<\/p>\n

\u603b\u7ed3<\/strong><\/div>\n

\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u53ef\u4ee5\u6536\u96c6\u672c\u5730\u548c\u8fdc\u7a0b\u4e3b\u673a\u7684\u4e2d\u592ersyslog\u670d\u52a1\u5668\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u597d\u5730\u4e86\u89e3\u5728\u8fd9\u4e9b\u7cfb\u7edf\u5185\u90e8\u7a76\u7adf\u53d1\u751f\u7740\u4ec0\u4e48\uff0c\u800c\u4e14\u53ef\u4ee5\u66f4\u52a0\u5bb9\u6613\u5730\u8c03\u8bd5\u5b83\u4eec\u7684\u95ee\u9898\uff0c\u662f\u5426\u5728\u5b83\u4eec\u4e4b\u95f4\u6709\u4efb\u4f55\u5ef6\u8fdf\u6216\u5d29\u6e83\u5b58\u5728\u3002<\/p>\n


\n

via: http:\/\/devzum.com\/2015\/01\/28\/top-12-best-free-network-monitoring-tools\/<\/a><\/p>\n

\u4f5c\u8005\uff1aCaezsar M<\/a> \u8bd1\u8005\uff1atheo-l <\/a>\u6821\u5bf9\uff1awxy<\/a>\u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-5023-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/linux-sys-log.html<\/a>\u7f16\u8f91\uff1a\u5f20\u632f\u5b87\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb Syslog\u670d\u52a1\u5668\u53ef\u4ee5\u7528\u4f5c\u4e00\u4e2a\u7f51\u7edc\u4e2d\u7684\u65e5\u5fd7\u76d1\u63a7\u4e2d\u5fc3\uff0c\u6240\u6709\u80fd\u591f\u901a\u8fc7\u7f51\u7edc\u6765\u53d1\u9001\u65e5\u5fd7\u7684\u8bbe\u65bd\uff08\u5305\u542b\u4e86Linux\u6216 […]<\/p>\n","protected":false},"author":310,"featured_media":46102,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-46094","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/46094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=46094"}],"version-history":[{"count":14,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/46094\/revisions"}],"predecessor-version":[{"id":269837,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/46094\/revisions\/269837"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/46102"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=46094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=46094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=46094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}