I want to clean a Docker container logs every day (no need to store/archive the data). I created a file called docker in /etc/logrotate.d and put the following inside: well, but it doesn’t work. So, obviously something in my logrotate configuration isn’t right. AFAIK, I don’t need to setup c…
Tag: logrotate
No activity on server with logging every 5 seconds
Recently I have notices that log files on my server grow faster than I was expecting. After a quick look I have realized that it is wtmp what aggressively is taking my disk space. Using utmpdump command (see below) I found out that every 5 seconds new 3 or 4 logs are recorded. There is no load on the server:
Redirecting output of a program to a rotating file
I am trying to redirect the output of a continuously running program to a file say error_log. The command I am using looks like this, where myprogram.sh runs continuously generating data and writing to /var/log/httpd/error_log myprogram.sh >> /var/log/httpd/error_log Now I am using logrotate to rotate t…
logrotate configuration file development and testing
I have two questions related to developing configuration files for the logrotate tool on Linux systems. When I make a change to a file in /etc/logrotate.d, do I need to somehow notify logrotate so that it will recognize and respond to the change? It seems to notice changes on its own, eventually, but when tes…