All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Kerrisk <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Jeremy Kerr <jk-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/3] syslog: Add type 10
Date: Thu, 14 Feb 2008 19:53:49 +0100	[thread overview]
Message-ID: <47B48E3D.8040504@gmail.com> (raw)
In-Reply-To: <1202861911.329926.179390617729.qpush@pokey>

Hi Jeremy,

Jeremy Kerr wrote:
> Since 2.6.6, we've had another type (10) option to the syslog syscall,
> this change adds it to the syslog manpage.
> 
> Signed-off-by: Jeremy Kerr <jk-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
> 
> ---
> 
>  man2/syslog.2 |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> Index: man-pages-2.77/man2/syslog.2
> ===================================================================
> --- man-pages-2.77.orig/man2/syslog.2
> +++ man-pages-2.77/man2/syslog.2
> @@ -66,19 +66,20 @@ Quoting from
>   *      7 \-\- Enable printk's to console
>   *      8 \-\- Set level of messages printed to console
>   *      9 \-\- Return number of unread characters in the log buffer
> + *     10 \-\- Return size of the log buffer
>   */
>  .fi
>  
> -Only function 3 is allowed to non-root processes.
> -(Function 9 was added in 2.4.10.)
> +Only functions 3 and 10 are allowed to non-root processes.

A nicely caught detail; confirmed.

> +(Function 9 was added in 2.4.10, function 10 in 2.6.6)

Version number confirmed.  Thanks for attending to that detail.

>  .B The kernel log buffer
>  .br
>  The kernel has a cyclic buffer of length
>  .B LOG_BUF_LEN
>  (4096, since 1.3.54: 8192, since 2.1.113: 16384; in recent kernels
> -the size can be set at compile time) in which messages given as argument
> -to the kernel function
> +the size can be queried with function 10) in which messages given as
> +argument to the kernel function
>  .BR printk ()
>  are stored
>  (regardless of their loglevel).

Patch applied for man-pages-2.79.

But it seems to me that the piece on LOG_BUF_LEN was somewhat out of date.
 I reworked it as the following (could you confirm these details?):

===
The kernel has a cyclic buffer of length
.B LOG_BUF_LEN
in which messages given as arguments to the kernel function
.BR printk ()
are stored (regardless of their loglevel).
In early kernels,
.B LOG_BUF_LEN
had the value 4096;
from kernel 1.3.54, it was 8192;
from kernel 2.1.113 it was 16384;
since 2.4.23/2.6 the value is a kernel configuration option.
.\" Under "General setup" ==> "Kernel log buffer size"
In recent kernels the size can be queried with command type 10.
===

Cheers,

Michael

-- 
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug?  Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html

  reply	other threads:[~2008-02-14 18:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13  0:18 [PATCH 0/3] syslog.2 updates Jeremy Kerr
2008-02-13  0:18 ` [PATCH 3/3] syslog: document all type options Jeremy Kerr
2008-02-14 18:54   ` Michael Kerrisk
2008-02-13  0:18 ` [PATCH 2/3] syslog: printk isn't posessive, or a contraction Jeremy Kerr
2008-02-14 18:54   ` Michael Kerrisk
2008-02-13  0:18 ` [PATCH 1/3] syslog: Add type 10 Jeremy Kerr
2008-02-14 18:53   ` Michael Kerrisk [this message]
2008-02-14 18:53 ` [PATCH 0/3] syslog.2 updates Michael Kerrisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B48E3D.8040504@gmail.com \
    --to=mtk.manpages-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=jk-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.