<div dir="rtl"><div dir="ltr">I run the command:</div><div dir="ltr"> pgpool -n 2&gt;&amp;1 | /usr/sbin/rotatelogs -l -c -v -f /PostgreSQL/pgpool/log/pgpool.log.%c 15 &amp;</div><div dir="ltr">because of the flag &#39;&amp;&#39; it suppose to work in the background. However, when I exit my current session pgpool continues to work but the rotation stopps.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2018-03-08 0:29 GMT+02:00 Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt;</span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt;&gt; What do you mean by stopped the command before starting ? stopped what<br>
&gt;&gt; exactly ?<br>
&gt;<br>
&gt; I thought you restarted pgpool next day. Now I realize you haven&#39;t<br>
&gt; restarted pgpool. So please ignore my question.<br>
&gt;<br>
&gt; I tested something like:<br>
&gt; pgpool ... 2&gt;&amp;1 | /usr/bin/rotatelogs -c -l -v -f /tmp/pgpool.log.%c 15 &amp;<br>
&gt;<br>
&gt; and rotatelog created:<br>
&gt;<br>
&gt; /tmp/pgpool.log.Tue Mar  6 11:15:00 2018<br>
&gt; /tmp/pgpool.log.Tue Mar  6 11:15:15 2018<br>
&gt; /tmp/pgpool.log.Tue Mar  6 11:15:30 2018<br>
&gt;<br>
&gt; as expected (this is Ubuntu 16). Let me try with 86400 instead of 15<br>
&gt; tonight.<br>
<br>
</span>It worked as expected.<br>
<br>
File rotation needed, reason: Time interval expired<br>
Opening file /tmp/pgpool.log.Wednesday<br>
Closing file /tmp/pgpool.log.Tuesday<br>
<br>
And the new log contains some output from Pgpool-II:<br>
<br>
$ cat /tmp/pgpool.log.Thursday<br>
2018-03-08 06:06:45: pid 30858: LOG:  child process with pid: 30863 exits with status 256<br>
2018-03-08 06:06:45: pid 30858: LOG:  fork a new child process with pid: 15676<br>
<div class="HOEnZb"><div class="h5"><br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
<br>
&gt;&gt; 2018-03-06 4:23 GMT+02:00 Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt;&gt; &gt; Hi,<br>
&gt;&gt;&gt; &gt; I used the next command to start the pool and to start the log rotation :<br>
&gt;&gt;&gt; &gt; pgpool -n 2&gt;&amp;1 | /usr/sbin/rotatelogs -l -f<br>
&gt;&gt;&gt; &gt; /PostgreSQL/pgpool/log/pgpool.<wbr>log.%A 86400 &amp;<br>
&gt;&gt;&gt; &gt; pgpool started and the log was named : pgpool.log.Wednesday<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; However, the next day after running this command, a new log is created at<br>
&gt;&gt;&gt; &gt; 01:11 am but the log is stuck and nothing is written to it. Right now my<br>
&gt;&gt;&gt; &gt; logs name is pgpool.log.Thursday and nothing is written to it. A new log<br>
&gt;&gt;&gt; is<br>
&gt;&gt;&gt; &gt; created but nothing is written to all the logs..<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Have you stopped the command before starting? I guess rotatelogs<br>
&gt;&gt;&gt; process reamains.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Best regards,<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Tatsuo Ishii<br>
&gt;&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt;&gt;<br>
</div></div></blockquote></div><br></div>