[one-users] Rotating the econe-server.log and the sunstone.log
rdiez
rdiez at cesga.es
Mon Jan 5 00:34:14 PST 2015
Sorry by the mistake:
The right option is "copytruncate" and not "/copytruncate"....
On 01/05/2015 09:27 AM, rdiez wrote:
> Hi:
>
> Try to add the option "/copytruncate" to your log logrotate setup....
>
>
> By default, log rotate move the logfile and creates a new one. But the
> file handle that the process uses already points to the moved
> (renamed) old log file instead the newly created one... so the process
> already writes in the old log file.
>
> With the "copytruncate" option, the old log file is first copied
> before "truncate" (i.e. : void its contends) instead moved.... In this
> manner, the file handle already points to the right file.
>
> Please note that this action launched by the copytruncate option is
> //much slower that the default action of move the file, so there is
> possible to lose a few log data while it is working...
>
>
> I hope this helps you.
>
> Cheers
>
> /
> On 01/02/2015 06:30 PM, Steven Timm wrote:
>>
>> I have a logrotate set up for /var/log/one/oned.log and sched.log
>> that works just fine
>>
>> [timm at snowball logrotate.d]$ more oned
>> /var/log/one/*.log {
>> missingok
>> daily
>> notifempty
>> sharedscripts
>> postrotate
>> killall -HUP oned
>> killall -HUP mm_sched
>> endscript
>> }
>>
>> However, when I try to have it also rotate the econe-server.log
>> and the sunstone.log it doesn't work. the new log file appears
>> as scheduled but econe-server keeps writing to the old dated one
>> and the new log file is blank. sending a HUP signal to econe-server
>> does not appear to make any difference. suggestions?
>>
>> Steve
>>
>>
>> ------------------------------------------------------------------
>> Steven C. Timm, Ph.D (630) 840-8525
>> timm at fnal.gov http://home.fnal.gov/~timm/
>> Office: Wilson Hall room 804
>> Fermilab Scientific Computing Division,
>> Scientific Computing Facilities Quadrant.,
>> Experimental Computing Facilities Dept.,
>> Project Lead for Virtual Facility Project.
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20150105/af04e3b8/attachment.htm>
More information about the Users
mailing list