[Linux-HA] question on heartbeat logging

Todd Denniston Todd.Denniston at ssa.crane.navy.mil
Thu Feb 23 04:14:43 MST 2006


Werner Fischer wrote:
> you are right - I missed the "without restarting heartbeat" in the
> original question. sorry for my confusion.
> 

Actually, your (Werner Fischer) original answer was correct.
logrotate deals with the ha-log just fine, at least on my Fedora Core 1 
systems, i.e., as FC1 comes configured to rotate all the logs in /var/log, so 
  if I:
cd /var/log/
ls -ltrh ha-log*
#I get:
-rw-r--r--  1 root root  56K Nov 18 21:39 ha-log.3
-rw-r--r--  1 root root    0 Dec  1 04:02 ha-log.2
-rw-r--r--  1 root root  42K Jan 31 22:10 ha-log.1
-rw-r--r--  1 root root 302K Feb 22 18:16 ha-log

been a bad month :}

> On Wed, 2006-02-22 at 10:44 -0600, Dave Blaschke wrote:
> 
>>Sweet, Larry D wrote:
>>
>>
>>>Hello, all,
>>> 
>>>The log /var/log/ha-log is getting quite large, over 400 meg.  can I 
>>>delete it, I believe it will recreate itself without restarting heartbeat?
>>>How do I control the size?
>>
>>Well, you can certainly "truncate" the log file via "echo > 
>>/var/log/ha-log" while heartbeat is running and heartbeat will continue 
>>to log to the file without having to be restarted.  Deleting the file 
>>while it is not used by ANY process is okay too.  However, deleting the 
>>file while it is in use (opened by heartbeat) will result in the file 
>>being marked as deleted even though heartbeat continues to log to it - 
>>of course when the file IS no longer in use, it is deleted so that any 
>>logging which occurred between the rm and the file's final close will be 
>>lost.
>>
>>
>>>Thanks
>>>Larry
>>>
>>>------------------------------------------------------------------------
>>>

-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter



More information about the Linux-HA mailing list