<div dir="ltr"><br><div class="gmail_extra">Jim,<br><br></div><div class="gmail_extra">Cron and Logrotate already installed in my machine and already configured as the steps you enlisted. But still logrotate is not running.<br>
</div><div class="gmail_extra"><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Date: Tue, 21 May 2013 12:28:31 -0700<br>
From: Jim Lucas <<a href="mailto:lists@cmsws.com">lists@cmsws.com</a>><br>
Subject: Re: [asterisk-users] Asterisk Log rotate not working<br>
To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
<<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>><br>
Message-ID: <<a href="mailto:519BCADF.1000305@cmsws.com">519BCADF.1000305@cmsws.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 5/21/2013 11:54 AM, Ahmed Munir wrote:<br>
> Checked in /var/logs/ directory, all logs are not rotating by logrotate.<br>
> Please advise how can I overcome this issue as I'm using CentoOS 5<br>
<br>
Ahmed,<br>
<br>
Proper log rotation depends on a couple things working together<br>
correctly to get the job done. First, you need to make sure you have<br>
the space to rotate the logs. If you have compression enabled,<br>
logrotate creates a copy of the file(s) as it compresses them. You<br>
could be running out of space???<br>
<br>
Next you need to verify that everything is in place, follow these steps<br>
to do so. Keep in mind that I have CentOS 6.4. So the packages might<br>
differ a little in the name and surely in the version numbering.<br>
<br>
1) Verify logrotate is installed to your system.<br>
# yum install logrotate<br>
<br>
if it asks you to install it, do so.<br>
<br>
2) Verify that crond is installed and running.<br>
Below is the output I get when searching yum to see if crond is<br>
installed. If your query returns nothing then crond is not installed.<br>
<br>
[root@jim etc]# yum list all | grep ^cron | grep "@"<br>
cronie.x86_64 1.4.4-7.el6<br>
@anaconda-CentOS-201303020151.x86_64/6.4<br>
cronie-anacron.x86_64 1.4.4-7.el6<br>
@anaconda-CentOS-201303020151.x86_64/6.4<br>
crontabs.noarch 1.10-33.el6<br>
@anaconda-CentOS-201303020151.x86_64/6.4<br>
<br>
If crond is not installed, then you will need to install it. Once<br>
you have it installed, move on to the next step.<br>
<br>
3) Make sure crond is setup to start at boot time.<br>
<br>
chkconfig crond on<br>
<br>
4) Verify that logrotate is in one of the cron include folders. Mine<br>
is located in the cron.daily folder.<br>
<br>
[root@jim etc]# find /etc/*/logrotate<br>
/etc/cron.daily/logrotate<br>
<br>
If you don't find that the above file exists, you might need to<br>
re-install logrotate.<br>
<br>
Next I would've had you verify that you have a config file in<br>
/etc/logrotate.d/ for the asterisk log files. But it seems you already<br>
to. After all this, if it still isn't working, double check all the<br>
steps above.<br>
<br>
Let us know if this does or doesn't help.<br>
<br>
--<br>
Jim Lucas<br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br><br>Ahmed Munir Chohan<br><br>
</div></div>