<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Dear all<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The logrotate does not rotate. Can you please help me?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I have installed the package CSWlogrotate 3.8.3,REV=2012.11.14<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I don’t find the logrotate.conf, so I have to create an own file /etc/logrotate.conf. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>My file /etc/logrotate.conf:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>include /etc/logrotate.d<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>cat /etc/logrotate.d/puppet <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/var/log/puppet/agent.log{<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> daily<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> missingok<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> rotate 14<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> compress<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delaycompress<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> notifempty<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> copytruncate<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Running logrotate tells the the file /var/log/puppet/agent.log needs rotating but it does not do it.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/opt/csw/sbin/logrotate -dfv /etc/logrotate.conf <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>reading config file /etc/logrotate.conf<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>including /etc/logrotate.d<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>reading config file puppet<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Handling 1 logs<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>rotating pattern: /var/log/puppet/agent.log forced from command line (14 rotations)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>empty log files are not rotated, old logs are removed<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>considering log /var/log/puppet/agent.log<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> log needs rotating<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>rotating log /var/log/puppet/agent.log, log->rotateCount is 14<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>dateext suffix '-20150130'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>previous log /var/log/puppet/agent.log.1 does not exist<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.14.gz to /var/log/puppet/agent.log.15.gz (rotatecount 14, logstart 1, i 14), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.13.gz to /var/log/puppet/agent.log.14.gz (rotatecount 14, logstart 1, i 13), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.12.gz to /var/log/puppet/agent.log.13.gz (rotatecount 14, logstart 1, i 12), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.11.gz to /var/log/puppet/agent.log.12.gz (rotatecount 14, logstart 1, i 11), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.10.gz to /var/log/puppet/agent.log.11.gz (rotatecount 14, logstart 1, i 10), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.9.gz to /var/log/puppet/agent.log.10.gz (rotatecount 14, logstart 1, i 9), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.8.gz to /var/log/puppet/agent.log.9.gz (rotatecount 14, logstart 1, i 8), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.7.gz to /var/log/puppet/agent.log.8.gz (rotatecount 14, logstart 1, i 7), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.6.gz to /var/log/puppet/agent.log.7.gz (rotatecount 14, logstart 1, i 6), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.5.gz to /var/log/puppet/agent.log.6.gz (rotatecount 14, logstart 1, i 5), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.4.gz to /var/log/puppet/agent.log.5.gz (rotatecount 14, logstart 1, i 4), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.3.gz to /var/log/puppet/agent.log.4.gz (rotatecount 14, logstart 1, i 3), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.2.gz to /var/log/puppet/agent.log.3.gz (rotatecount 14, logstart 1, i 2), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.1.gz to /var/log/puppet/agent.log.2.gz (rotatecount 14, logstart 1, i 1), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>renaming /var/log/puppet/agent.log.0.gz to /var/log/puppet/agent.log.1.gz (rotatecount 14, logstart 1, i 0), <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>copying /var/log/puppet/agent.log to /var/log/puppet/agent.log.1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>truncating /var/log/puppet/agent.log<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>removing old log /var/log/puppet/agent.log.15.gz<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>error: error opening /var/log/puppet/agent.log.15.gz: No such file or directory<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>/var/log/puppet# ls -l<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>total 29209<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>-rw-r--r-- 1 root root 14913631 Jan 30 12:26 agent.log<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Best regards<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Andreas Dvorak</span><span lang=EN-US style='mso-fareast-language:DE'><o:p></o:p></span></p></div></body></html>