<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Book Antiqua";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'>You can have
logrotate entries like the following:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'># rotate some
Logs<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'>/logdirectory/messages
{<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'> weekly<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'> rotate 12<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'> compress<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'> postrotate<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'>
/usr/bin/pkill -HUP syslog<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'> endscript<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'>}<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'>What this does
is simply rotate the log, and then send HUP to Syslog-NG to stop it from writing
to the current inode which points to the recently rotated logfile. This
specific configuration will rotate weekly, keeping 12 compressed revisions
using GZIP.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'>I hope this
helps,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'>Justin.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:blue'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Padmanabhan,
Rajeesh (GE Healthcare) [mailto:Rajeesh.Padmanabhan@ge.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, March 09, 2007 6:16
AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Syslog-ng
users' and developers' mailing list</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [syslog-ng] Syslog-ng
log file overwrite</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Basically what i
am trying to configure is <strong><b><font face="Trebuchet MS"><span
style='font-family:"Trebuchet MS"'>log rotation</span></font></b></strong> of
Syslog-ng files.. </span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabIndex=-1>
</span></font></div>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Padmanabhan, Rajeesh (GE
Healthcare)<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, March 09, 2007 3:52
PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Syslog-ng
users' and developers' mailing list</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> [syslog-ng] Syslog-ng log
file overwrite</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=2 face="Trebuchet MS"><span style='font-size:
10.0pt;font-family:"Trebuchet MS"'>Hi Bazsi,</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face="Trebuchet MS"><span style='font-size:
10.0pt;font-family:"Trebuchet MS"'>Do syslog-ng overwrites log file by default?
If yes, what is the process/strategy done by syslog-ng to overwrite the file?</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face="Trebuchet MS"><span style='font-size:
10.0pt;font-family:"Trebuchet MS"'>Thanks,</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=2 face="Trebuchet MS"><span style='font-size:
10.0pt;font-family:"Trebuchet MS"'>Rajeesh</span></font><o:p></o:p></p>
</div>
</div>
</body>
</html>