Grading Checklist¶
- Uses
du -sh /var/log/*to identify the largest log directories and files. - Identifies the specific log file consuming the most space.
- Checks logrotate configuration for the application log and identifies the misconfiguration.
- Verifies logrotate execution: checks
/var/lib/logrotate/statusand cron logs. - Explains the difference between
copytruncateand the default rename/create rotation method. - Identifies that the application does not reopen log files after rotation (needs
copytruncateorpostrotatesignal). - Provides immediate relief: truncate the log file or run logrotate manually.
- Warns about checking for deleted-but-open files with
lsof +L1before assuming disk space is freed. - Recommends fixing the logrotate config and testing with
logrotate -d. - Suggests reducing log verbosity if the application is logging at DEBUG level.
- Mentions checking
journalctl --disk-usageand setting journal size limits. - Recommends setting up disk usage monitoring and alerting at lower thresholds (80%, 90%).