home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.ubuntu      I preferred Xubuntu, seemed a bit faster      134,474 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 134,362 of 134,474   
   Mike Scott to Dan Purgert   
   Re: daemon program?   
   10 Sep 25 16:52:28   
   
   XPost: uk.comp.os.linux   
   From: usenet.16@scottsonline.org.uk.invalid   
      
   On 10/09/2025 12:31, Dan Purgert wrote:   
   > On 2025-09-10, Mike Scott wrote:   
   >> On 10/09/2025 10:37, Dan Purgert wrote:   
   >>> I'm not sure what you mean here.  "Logrotate" is a tool that exists.   
   >>   
   >> logrotate assumes the target can close and re-open its log.   
   >   
   > By default, sure; but there are options to deal with it.   
   >   
   >   
   > copytruncate   
   >    Truncate  the original log file to zero size in place after cre-   
   >    ating a copy, instead of moving the old log file and  optionally   
   >    creating  a new one.  It can be used when some program cannot be   
   >    told to close its logfile and thus might continue  writing  (ap-   
   >    pending) to the previous log file forever.  Note that there is a   
   >    very small time slice between copying the  file  and  truncating   
   >    it,  so  some  logging  data might be lost.  When this option is   
   >    used, the create option will have no effect, as the old log file   
   >    stays  in place.  The copytruncate option allows storing rotated   
   >    log files on the different devices using olddir directive.  The   
   >    copytruncate option implies norenamecopy.   
   >   
      
   logrotate is a new one to me, and I didn't see this on a quick glance at   
   the man page; thanks for pointing it out. There's no freebsd equivalent   
   AFAIK, where newsyslog does the equivalent job.   
      
   I'm not sure about the potential data loss that's noted in the man page.   
   I dislike anything that can fail unexpectedly and lose data.   
      
   Anyway, I have made the alteration to the daemon program itself. My   
   version looks for SIGUSR2, which will close and reopen the log files   
   without any data loss.   
      
   Good to have a choice though, so thanks for the helpful reply.   
      
      
      
      
      
   --   
   Mike Scott   
   Harlow, England   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca