From: Larry G. <Li...@IS...> - 2003-08-17 18:26:55
|
Hi Neil, I am running Red Hat and added a file to /etc/logrotate.d/ called webmin. The file has the following contents: /var/webmin/miniserv.error /var/webmin/miniserv.log /var/webmin/webmin.log { missingok notifempty sharedscripts postrotate /bin/kill -HUP `cat /var/webmin/miniserv.pid 2>/dev/null` 2> /dev/null || true endscript } It is the same contents as httpd logrotate. --Larry >-----Original Message----- >From: Neil Aggarwal >Hello: > >It looks like webmin uses these logs: > /var/webmin/miniserv.error > /var/webmin/miniserv.log > /var/webmin/webmin.log > >But it does not automatically set up logrotation of them. > >If I add these lines to /etc/logrotate.conf, they should rotate: >/var/webmin/*.log /var/webmin/*.error { >} > >Will this cause problems for webmin in any way? > >Thanks, > Neil > >-- >Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com >FREE! Valuable info on how your business can reduce operating costs by >17% or more in 6 months or less! => >http://newsletter.JAMMConsulting.com > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_ >072303_01/01 >- >Forwarded by the Webmin mailing list at >web...@li... >To remove yourself from this list, go to >http://lists.sourceforge.net/lists/listinfo/webadmin-list > |
From: Larry G. <Li...@IS...> - 2003-08-18 12:22:45
|
Hi Neil, >-----Original Message----- >From: Neil Aggarwal >Does webmin need to restart each time the log rotates? I believe the answer is yes. Some time ago I asked a similar question and the response was to mirror the httpd logrotate configuration. My memory is a bit rusty as to why apache needs to be restarted. What I believe is correct is that Apache will open a file and refer to the file by id an not by name. So when logrotate changes the filename, httpd needs to be restarted to find the new id associated with the new name (i.e. access_log) versus the renamed file (i.e. access_log.1). Otherwise you would continue to keep logging to the renamed file. So in short, I believe that Apache and Webmin open a file and keep it open to stream log events rather than opening, writing, closing, opening, writing, etc. A restart is necessary to close the file and open the new log. Any corrections are most welcome! --Larry |
From: Neil A. <ne...@JA...> - 2003-08-19 18:32:36
|
Larry: Thank you for the info. I have set my logrotate to restart webmin after rotating. Thanks, Neil -- Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com FREE! Valuable info on how your business can reduce operating costs by 17% or more in 6 months or less! => http://newsletter.JAMMConsulting.com > -----Original Message----- > From: web...@li... > [mailto:web...@li...] On Behalf > Of Larry Gilson > Sent: Monday, August 18, 2003 7:08 AM > To: 'web...@li...' > Subject: RE: [webmin-l] Rotating webmin logs > > > Hi Neil, > > >-----Original Message----- > >From: Neil Aggarwal > > >Does webmin need to restart each time the log rotates? > > > I believe the answer is yes. Some time ago I asked a similar > question and > the response was to mirror the httpd logrotate configuration. > My memory is > a bit rusty as to why apache needs to be restarted. What I believe is > correct is that Apache will open a file and refer to the file > by id an not > by name. So when logrotate changes the filename, httpd needs to be > restarted to find the new id associated with the new name > (i.e. access_log) > versus the renamed file (i.e. access_log.1). Otherwise you > would continue > to keep logging to the renamed file. So in short, I believe > that Apache and > Webmin open a file and keep it open to stream log events rather than > opening, writing, closing, opening, writing, etc. A restart > is necessary to > close the file and open the new log. > > Any corrections are most welcome! > > --Larry > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet > _072303_01/01 > - > Forwarded by the Webmin mailing list at > web...@li... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-list > |
From: Neil A. <ne...@JA...> - 2003-08-17 21:16:19
|
Larry: Does webmin need to restart each time the log rotates? Thanks, Neil -- Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com FREE! Valuable info on how your business can reduce operating costs by 17% or more in 6 months or less! => http://newsletter.JAMMConsulting.com > -----Original Message----- > From: web...@li... > [mailto:web...@li...] On Behalf > Of Larry Gilson > Sent: Sunday, August 17, 2003 1:27 PM > To: 'web...@li...' > Subject: RE: [webmin-l] Rotating webmin logs > > > Hi Neil, > > I am running Red Hat and added a file to /etc/logrotate.d/ > called webmin. > The file has the following contents: > > /var/webmin/miniserv.error /var/webmin/miniserv.log > /var/webmin/webmin.log { > missingok > notifempty > sharedscripts > postrotate > /bin/kill -HUP `cat /var/webmin/miniserv.pid 2>/dev/null` 2> > /dev/null || true > endscript > } > > It is the same contents as httpd logrotate. > > > --Larry > > > >-----Original Message----- > >From: Neil Aggarwal > > >Hello: > > > >It looks like webmin uses these logs: > > /var/webmin/miniserv.error > > /var/webmin/miniserv.log > > /var/webmin/webmin.log > > > >But it does not automatically set up logrotation of them. > > > >If I add these lines to /etc/logrotate.conf, they should rotate: > >/var/webmin/*.log /var/webmin/*.error { > >} > > > >Will this cause problems for webmin in any way? > > > >Thanks, > > Neil > > > >-- > >Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com > >FREE! Valuable info on how your business can reduce > operating costs by > >17% or more in 6 months or less! => > >http://newsletter.JAMMConsulting.com > > > > > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built ASP.NET sites > including > >Data Reports, E-commerce, Portals, and Forums are available now. > >Download today and enter to win an XBOX or Visual Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_ > >072303_01/01 > >- > >Forwarded by the Webmin mailing list at > >web...@li... > >To remove yourself from this list, go to > >http://lists.sourceforge.net/lists/listinfo/webadmin-list > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet > _072303_01/01 > - > Forwarded by the Webmin mailing list at > web...@li... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-list > |