Linux command
logwatch 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Example
logwatch --range [yesterday|today|all] --detail [low|medium|high]
Example
logwatch --range all --service [apache|sshd|pam_unix]
说明
logwatch is a log analysis and reporting tool that summarizes logs from various services into a single report. It parses logs from Apache, SSH, PAM, and many other services to highlight important events.
参数
- --range RANGE
- Date range: yesterday, today, all, or specific dates
- --detail LEVEL
- Detail level: low, medium, high, or 0-10
- --service SERVICE
- Analyze specific service only
- --output FORMAT
- Output format: stdout, file, mail
- --mailto ADDRESS
- Email report to address
- --filename FILE
- Output to specific file
FAQ
What is the logwatch command used for?
logwatch is a log analysis and reporting tool that summarizes logs from various services into a single report. It parses logs from Apache, SSH, PAM, and many other services to highlight important events.
How do I run a basic logwatch example?
Run `logwatch --range [yesterday|today|all] --detail [low|medium|high]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --range RANGE do in logwatch?
Date range: yesterday, today, all, or specific dates