procServ >= 2.6 will re-open it's log file when SIGHUP is received (as
is typical of unix daemons).
https://github.com/epicsdeb/sysv-rc-softioc/blob/master/debian/sysv-rc-softioc.logrotate
On 06/02/2015 04:45 PM, Wesley Moore wrote:
> Mark,
>
> I had the same issue with some very verbose iocs. What I did to solve this was by using logrotate to manage the log files. Here's the basics of my config (note you can rotate on size too):
>
> # /etc/logrotate.d/softiocs
> <path to logs>/*log {
> notifempty
> copytruncate
> daily
> rotate 7
> dateext
> compress
> }
>
> Log files end up like this:
> -rw-r--r-- 1 epics clas-3 311M Jun 2 16:41 iocsvtDaqDpm0.log
> -rw-r--r-- 1 epics clas-3 4.2M May 27 04:12 iocsvtDaqDpm0.log-20150527.gz
> -rw-r--r-- 1 epics clas-3 2.1M May 28 04:09 iocsvtDaqDpm0.log-20150528.gz
> -rw-r--r-- 1 epics clas-3 2.3M May 29 04:06 iocsvtDaqDpm0.log-20150529.gz
> -rw-r--r-- 1 epics clas-3 2.3M May 30 04:07 iocsvtDaqDpm0.log-20150530.gz
> -rw-r--r-- 1 epics clas-3 2.4M May 31 04:11 iocsvtDaqDpm0.log-20150531.gz
> -rw-r--r-- 1 epics clas-3 2.4M Jun 1 04:07 iocsvtDaqDpm0.log-20150601.gz
> -rw-r--r-- 1 epics clas-3 2.5M Jun 2 04:08 iocsvtDaqDpm0.log-20150602.gz
>
> Wesley
>
>> From: "Mark Rivers" <[email protected]>
>> To: "Ralph Lange" <[email protected]>
>> Cc: "EPICS Tech-Talk" <[email protected]>
>> Sent: Tuesday, June 2, 2015 4:22:07 PM
>> Subject: Rotating or deleting procServ log files
>
>> Ralph,
>
>> procServ log files sometimes get very large, so we would like to rotate them,
>> and or delete them and start a new one without restarting the procServ process.
>
>> Is this possible? I found that if I rename the log file procServ just kept
>> writing to the renamed file. If I delete the log file procServ does not create
>> a new one, it just silently continues without logging anything.
>
>> Is there a correct way to replace the current log file without restarting the
>> procServ process?
>
>> This is procServ 2.6.0.
>
>> Thanks,
>
>> Mark
>
- References:
- Rotating or deleting procServ log files Mark Rivers
- Re: Rotating or deleting procServ log files Wesley Moore
- Navigate by Date:
- Prev:
Re: Rotating or deleting procServ log files Wesley Moore
- Next:
Re: Rotating or deleting procServ log files Jani Hakala
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Rotating or deleting procServ log files Wesley Moore
- Next:
RE: Rotating or deleting procServ log files Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|