pgpool2.git / summary / log / commit / refs

commit    7545eaace02017fd79fcf8733415846ffa5c389b
Author:   Yoshiyuki Asaba <y-asaba at pgfoundry.org>
Date:     Thu Mar 27 07:24:22 2008 +0000

    Add an example to rotate pgpool log files.


doc/tutorial-en.html | 34 ++++++++++++++++++++++++++++------ doc/tutorial-ja.html | 30 ++++++++++++++++++++++++++---- 2 files changed, 54 insertions(+), 10 deletions(-) diff --git a/doc/tutorial-en.html b/doc/tutorial-en.html index cf641428c..a50713e05 100644 --- a/doc/tutorial-en.html +++ b/doc/tutorial-en.html @@ -193,15 +193,37 @@ SELECT queries are equally distributed among three servers.</p> <pre>$ pgpool</pre> -<p>The above command, however, prints log messages on the terminal, so -the recommended options to use are like the following.</p> +<p>The above command, however, prints no log messages because pgpool +detaches the terminal. If you want to show pgpool log messages, you +pass <code>-n</code> option to pgpool command. pgpool-II is executed +as non-daemon process, and the terminal will not be detached. +</p> + +<pre> +$ pgpool -n & +</pre> + +<p> +The log messages are printed on the terminal, so the recommended +options to use are like the following. +</p> <pre>$ pgpool -n -d &gt; /tmp/pgpool.log 2&gt;&1 &</pre> -<p>When <code>-n</code> option is passed, pgpool-II is executed as -non-daemon process, and the terminal will not be detached. This option -is required to redirect log messages to a file. <code>-d</code> option -enables debug messages to be generated.</p> +<p><code>-d</code> option enables debug messages to be generated.</p> + +<p> +The above command keeps appending log messages to /tmp/pgpool.log. If +you need to rotate log files, pass the logs to a external command +which have log rotation function. For example, <a +href="http://www.cronolog.org"><code>cronolog</code></a> helps you. +</p> + +<pre> +$ pgpool -n 2>&1 | /usr/sbin/cronolog \ + --hardlink=/var/log/pgsql/pgpool.log \ + '/var/log/pgsql/%Y-%m-%d-pgpool.log' & +</pre> <p>To stop pgpool-II process, execute the following command.</p> diff --git a/doc/tutorial-ja.html b/doc/tutorial-ja.html index 078c4dce9..637c69b41 100644 --- a/doc/tutorial-ja.html +++ b/doc/tutorial-ja.html @@ -98,11 +98,33 @@ backend_weight2 = 1</pre> <h3>1.5. <a name="start-shutdown">pgpool-II $B$N5/F0$HDd;_(B</a></h3> <p>pgpool-II $B$r5/F0$9$k$K$O0J2<$N$h$&$K(B <code>pgpool</code> $B%3%^%s%I$r<B9T$7$^$9!#(B</p> <pre>$ pgpool</pre> -<p>$B$?$@$7!"$3$N$^$^$G$O(B <code>pgpool</code> $B%3%^%s%I$r<B9T$7$?C<Kv$K%m%0%a%C%;!<%8$,I=<($5$l$k$N$G!"0J2<$N$h$&$K%m%0%a%C%;!<%8$r%U%!%$%k$KJ]B8$9$k$h$&$K<B9T$9$k$3$H$r$*4+$a$7$^$9!#(B</p> +<p> +$B$?$@$7!"$3$N$^$^$G$O(B <code>pgpool</code> $B%W%m%;%9$O@)8fC<Kv$r@Z$jN%(B +$B$9$?$a!"%m%0$,=PNO$5$l$J$/$J$j$^$9(B($B%(%i!<$OI8=`%(%i!<$K=PNO$5$l$^$9(B)$B!#(B +$B@)8fC<Kv$r@Z$jN%$5$J$$$G5/F0$9$k>l9g$O(B <code>-n</code> $B%*%W%7%g%s$r;XDj$7$^$9!#(B +</p> + +<pre> +$ pgpool -n & +</pre> + +<p> +$B%3%^%s%I$r<B9T$7$?C<Kv$K%m%0%a%C%;!<%8$,I=<($5$l$k$N$G!"0J2<$N$h$&$K%m%0%a%C%;!<%8$r%U%!%$%k$KJ]B8$9$k$h$&$K<B9T$9$k$3$H$r$*4+$a$7$^$9!#(B</p> <pre>$ pgpool -n -d &gt; /tmp/pgpool.log 2&gt;&1 &</pre> -<p><code>-n</code> $B%*%W%7%g%s$r;XDj$9$k$H(B pgpool-II $B$O%G!<%b%s$H$7$F5/F0$;$:!"@)8fC<Kv$,@Z$jN%$5$l$J$/$J$j$^$9!#(B -$B>e5-$N$h$&$K%m%0%a%C%;!<%8$r%U%!%$%k$K=PNO$9$k>l9g$O;XDj$9$kI,MW$,$"$j$^$9!#(B -<code>-d</code> $B%*%W%7%g%s$O%G%P%C%0%a%C%;!<%8$N=PNO$rM-8z$K$7$^$9!#(B</p> +<p><code>-d</code> $B%*%W%7%g%s$O%G%P%C%0%a%C%;!<%8$N=PNO$rM-8z$K$7$^$9!#(B</p> +<p> +$B>e5-$NNc$O%U%!%$%k$K%j%@%$%l%/%H$5$;$F$$$k$?$a!"%m%0$,DI2C$5$lB3$1$^$9!#(B +$B%m%0$r%m!<%F!<%H$5$;$?$$>l9g$O!"%m!<%F!<%H5!G=$r;}$C$?%3%^%s%I$K%m%0$r(B +$BEO$7$F$/$@$5$$!#Nc$($P!"(B<a +href="http://www.cronolog.org/"><code>cronolog</code></a> $B$r;H$&>l9g$G(B +$B$"$l$P!"0J2<$N$h$&$K%Q%$%W$G%m%0%a%C%;!<%8$rEO$7$F$/$@$5$$!#(B + +<pre> +$ pgpool -n 2>&1 | /usr/sbin/cronolog \ + --hardlink=/var/log/pgsql/pgpool.log \ + '/var/log/pgsql/%Y-%m-%d-pgpool.log' & +</pre> + <p>pgpool-II $B$rDd;_$9$k$K$O0J2<$N$h$&$K(B <code>pgpool</code> $B%3%^%s%I$r<B9T$7$^$9!#(B</p> <pre>$ pgpool stop</pre> <p>pgpool-II $B$rDd;_$9$k:]$K%/%i%$%"%s%H$,@\B3$7$F$$$k>l9g!"$=$N@\B3$,@ZCG$5$l$k$^$GBT$C$F$+$iDd;_$7$^$9!#(B [parent: a1b9dcb14a5e]