Hello everybody,
While I was carrying out maintenance operations on my FreePBX server, I noticed that some log files are no longer rotated since April.
Could it be due to a bug introduced by some update?
Below is a screenshot showing the full file as an example.
As you can see, on April 18, the rotation ends. Therefore, if I open the current full file, which has grown to 566MB in the meantime, the first line is dated April 18th as the last file rotated.
I have also checked the configuration files in /etc/logrotate.d/asterisk and the configuration seems correct to me. Here is how the configuration is set:
and the output of:
/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf -d
The info for /var/log/asterisk/full in that output might give some clues.
You might also want to try this if you see any permissions related complaints.
fwconsole chown
I suspect I know what your issue is… I’ve noticed this sporadically on systems, I’d look at the processes and would notice a hung logrotate due to pm2 reloadLogs. Like this :
better to truncate the log files rather than to delete them
echo : > /var/log/asterisk/full
you can call lograte with the -v (verbose) and -f (force) single instances logrotate -v -f /etc/logrotate.d/asterisk to better see what is going on here
I remember having something like this on my PBXact 13 box once about 18 months ago! In my case, I started getting complaints of poor call quality. Found that the process was running away, consuming 100% of the CPU time and making audio sound like absolute crap. Killed the process and the problems disappeared. Hasn’t happened since.
edit - I didn’t notice if the logs hadn’t rotated or not, but DO remember the name of the process was pm2… the same as what @dakudos posted malfunctioned on his box.