.\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl)
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" Written 11 June 1995 by Andries Brouwer <aeb@cwi.nl>
.\" 2008-02-15, Jeremy Kerr <jk@ozlabs.org>
.\" 2008-02-15, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Update LOG_BUF_LEN details; update RETURN VALUE section.
.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
.\" all rights reserved.
.\" Translated Mon Dec 16 11:16:34 JST 2001
.\" Updated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2008-04-04, Akihiro MOTOKI, LDP v2.79
.\" Updated 2008-07-31, Akihiro MOTOKI, LDP v3.05
+.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
.\"
-.\"WORD: kernel カーネル
-.\"WORD: message ring buffer メッセージ・リング・バッファ
-.\"WORD: library ライブラリ
-.\"WORD: kernel log buffer カーネル・ログ・バッファ
-.\"WORD: console コンソール
-.\"WORD: kernel panic カーネル・パニック
-.\"WORD: loglevel ログレベル
-.\"WORD: debug message デバッグ・メッセージ
-.\"
-.TH SYSLOG 2 2008-06-20 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
+.TH SYSLOG 2 2012\-11\-29 Linux "Linux Programmer's Manual"
.SH 名前
-.\"O syslog, klogctl \- read and/or clear kernel message ring buffer;
-.\"O set console_loglevel
-syslog, klogctl \- カーネルのメッセージ・リング・バッファを読んだり消去したりする;
-console_loglevel の設定を行う
-.\"O .SH SYNOPSIS
+syslog, klogctl \- カーネルのメッセージ・リング・バッファを読んだり消去したりする; console_loglevel の設定を行う
.SH 書式
.nf
-.BI "int syslog(int " type ", char *" bufp ", int " len );
-.\"O .B " /* No wrapper provided in glibc */"
-.B " /* glibc ではラッパー関数は提供されていない */"
+\fBint syslog(int \fP\fItype\fP\fB, char *\fP\fIbufp\fP\fB, int \fP\fIlen\fP\fB);\fP
+\fB/* glibc ではラッパー関数は提供されていない */\fP
.sp
-.\"O /* The glibc interface */
/* glibc のインタフェース */
.br
-.B "#include <sys/klog.h>"
+\fB#include <sys/klog.h>\fP
.sp
-.BI "int klogctl(int " type ", char *" bufp ", int " len );
+\fBint klogctl(int \fP\fItype\fP\fB, char *\fP\fIbufp\fP\fB, int \fP\fIlen\fP\fB);\fP
.fi
-.\"O .SH DESCRIPTION
.SH 説明
-.\"O If you need the C library function
-.\"O .BR syslog ()
-.\"O (which talks to
-.\"O .BR syslogd (8)),
-.\"O then look at
-.\"O .BR syslog (3).
-.\"O The system call of this name is about controlling the kernel
-.\"O .IR printk ()
-.\"O buffer, and the glibc version is called
-.\"O .BR klogctl ().
-.RB ( syslogd (8)
-と話す) C ライブラリ関数の
-.BR syslog ()
-が必要な場合は、
-.BR syslog (3)
-を見ること。
-この名前のシステム・コールはカーネルの
-.IR printk ()
-バッファを制御するものであり、glibc では
-.BR klogctl ()
-と呼ばれている。
-
-.\"O .The \fItype\fP argument determines the action taken by this function.
-\fItype\fP 引き数はこの関数の動作を決定する。
-
-.\"O Quoting from
-.\"O .IR kernel/printk.c :
-.I kernel/printk.c
-からの引用 :
-.nf
-.\"O /*
-.\"O * Commands to sys_syslog:
-.\"O *
-.\"O * 0 \-\- Close the log. Currently a NOP.
-.\"O * 1 \-\- Open the log. Currently a NOP.
-.\"O * 2 \-\- Read from the log.
-.\"O * 3 \-\- Read all messages remaining in the ring buffer.
-.\"O * 4 \-\- Read and clear all messages remaining in the ring buffer
-.\"O * 5 \-\- Clear ring buffer.
-.\"O * 6 \-\- Disable printk to console
-.\"O * 7 \-\- Enable printk to console
-.\"O * 8 \-\- Set level of messages printed to console
-.\"O * 9 \-\- Return number of unread characters in the log buffer
-.\"O * 10 \-\- Return size of the log buffer
-.\"O */
-/*
- * Commands to sys_syslog:
- *
- * 0 \-\- ログを閉じる。現在の実装では何もしない (NOP) 。
- * 1 \-\- ログを開く。現在の実装では何もしない (NOP) 。
- * 2 \-\- ログから読み出す。
- * 3 \-\- リング・バッファに残っているメッセージをすべて読み出す。
- * 4 \-\- リング・バッファに残っているメッセージをすべて読み出し、消去する。
- * 5 \-\- リングバッファを消去する。
- * 6 \-\- コンソールへの printk を無効にする。
- * 7 \-\- コンソールへの printk を有効にする。
- * 8 \-\- コンソールに表示されるメッセージのレベルを設定する。
- * 9 \-\- ログバッファの未読の文字数を返す。
- * 10 \-\- ログバッファのサイズを返す。
- */
-.fi
-
-.\"O Only command types 3 and 10 are allowed to unprivileged processes.
-.\"O Type 9 was added in 2.4.10; type 10 in 2.6.6.
-非特権プロセスにはコマンド 3 と 10 のみが許可されている
-(コマンド 9 は Linux 2.4.10 で、コマンド 10 は Linux 2.6.6 で追加された)。
-.\"O .SS The kernel log buffer
-.SS カーネル・ログ・バッファ (kernel log buffer)
-.\"O The kernel has a cyclic buffer of length
-.\"O .B LOG_BUF_LEN
-.\"O in which messages given as arguments to the kernel function
-.\"O .BR printk ()
-.\"O are stored (regardless of their loglevel).
-.\"O In early kernels,
-.\"O .B LOG_BUF_LEN
-.\"O had the value 4096;
-.\"O from kernel 1.3.54, it was 8192;
-.\"O from kernel 2.1.113 it was 16384;
-.\"O since 2.4.23/2.6 the value is a kernel configuration option.
-.\"O .\" Under "General setup" ==> "Kernel log buffer size"
-.\"O .\" For 2.6, precisely the option seems to have appeared in 2.5.55.
-.\"O In recent kernels the size can be queried with command type 10.
-カーネルは長さ
-.B LOG_BUF_LEN
-の巡回式のバッファを持っており、
-それにはカーネル関数の
-.BR printk ()
-の引き数として与えられた
-メッセージが (そのログレベルにかかわらず) 格納される。
-初期のカーネルでは
-.B LOG_BUF_LEN
-の値は 4096 であった。
-カーネル 1.3.54 からは 8192、
-カーネル 2.1.113 からは 16384 になり、
-カーネル 2.4.23 以降および 2.6 以降ではカーネルのコンパイル時に
-値を設定できるようになっている。
+(\fBsyslogd\fP(8) と話す) C ライブラリ関数の \fBsyslog\fP() が必要な場合は、
+\fBsyslog\fP(3) を見ること。この名前のシステム・コールはカーネルの
+\fIprintk\fP() バッファを制御するものであり、glibc ラッパー関数は
+\fBklogctl\fP() と呼ばれている。
+.SS "カーネル・ログ・バッファ (kernel log buffer)"
.\" Under "General setup" ==> "Kernel log buffer size"
.\" For 2.6, precisely the option seems to have appeared in 2.5.55.
-最近のカーネルでは、コマンド 10 でバッファのサイズを問い合わせできる。
-
-.\"O The call
-.\"O .I "syslog(2,buf,len)"
-.\"O waits until this kernel log buffer is nonempty, and then reads
-.\"O at most \fIlen\fP bytes into the buffer \fIbuf\fP.
-.\"O It returns
-.\"O the number of bytes read.
-.\"O Bytes read from the log disappear from
-.\"O the log buffer: the information can only be read once.
-.\"O This is the function executed by the kernel when a user program
-.\"O reads
-.\"O .IR /proc/kmsg .
-.I "syslog(2,buf,len)"
-の呼び出しはカーネル・ログ・バッファが空でなくなるまで待って、
-最大 \fIlen\fP バイトまで \fIbuf\fP へと読み出し、読み込んだ
-バイト数を返す。ログから読まれたバイトはログ・バッファから消える:
-情報は一度しか読むことができない。
-これはユーザーのプログラムが
-.I /proc/kmsg
-を読んだ時にカーネルによって実行される関数でもある。
-
-.\"O The call
-.\"O .I syslog(3,buf,len)
-.\"O will read the last \fIlen\fP bytes from the log buffer (nondestructively),
-.\"O but will not read more than was written into the buffer since the
-.\"O last "clear ring buffer" command (which does not clear the buffer at all).
-.\"O It returns the number of bytes read.
-.I syslog(3,buf,len)
-の呼び出しはログ・バッファの最後の \fIlen\fP バイトを
-(非破壊的に)読み出す、しかし、直近の「リング・バッファ消去」命令
-(この命令はバッファを消去するわけではない)
-以降にバッファに書き込まれた情報しか読み出せない。
-返り値は読み込んだバイト数である。
-
-.\"O The call
-.\"O .I syslog(4,buf,len)
-.\"O does precisely the same, but also executes the "clear ring buffer" command.
-.I syslog(4,buf,len)
-呼び出しは「リング・バッファ消去」命令も実行する以外は
-機能 3 と完全に同じである。
-
-.\"O The call
-.\"O .I syslog(5,dummy,dummy)
-.\"O executes just the "clear ring buffer" command.
-.\"O (In each call where
-.\"O .I buf
-.\"O or
-.\"O .I len
-.\"O is shown as "dummy", the value of the argument is ignored by the call.)
-.I syslog(5,dummy,dummy)
-呼び出しは「リング・バッファ消去」命令のみを実行する
-(呼び出しの書式で、
-.I buf
-や
-.I len
-が "dummy" と記載されている場合、その引き数の値が無視されることを表す)。
-
-.\"O The call
-.\"O .I syslog(6,dummy,dummy)
-.\"O sets the console log level to minimum, so that no messages are printed
-.\"O to the console.
-.I syslog(6,dummy,dummy)
-呼び出しはコンソールのログレベルを最小に設定し、
-コンソールにメッセージが表示されないようにする。
-
-.\"O The call
-.\"O .I syslog(7,dummy,dummy)
-.\"O sets the console log level to default, so that messages are printed
-.\"O to the console.
-.I syslog(7,dummy,dummy)
-呼び出しはコンソールのログレベルをデフォルトに設定し、
-コンソールにメッセージが表示されるようにする。
-
-.\"O The call
-.\"O .I syslog(8,dummy,level)
-.\"O sets the console log level to
-.\"O .IR level ,
-.\"O which must be an integer between 1 and 8 (inclusive).
-.\"O See the
-.\"O .B loglevel
-.\"O section for details.
-.I syslog(8,dummy,level)
-呼び出しはコンソールのログレベルを
-.I level
-に設定する。
-.I level
-は 1 以上 8 以下の整数でなければならない。
-詳細は
-.B ログレベル (loglevel)
-の節を参照のこと。
-
-.\"O The call
-.\"O .I syslog(9,dummy,dummy)
-.\"O returns the number of bytes currently available to be read
-.\"O on the kernel log buffer.
-.I syslog(9,dummy,dummy)
-呼び出しはカーネル・ログバッファにある現在読み出し可能なバイト数を返す。
-
-.\"O The call
-.\"O .I syslog(10,dummy,dummy)
-.\"O returns the total size of the kernel log buffer.
-.I syslog(10,dummy,dummy)
-呼び出しはカーネル・ログバッファの総量を返す。
-.\"O .SS The loglevel
-.SS ログレベル (loglevel)
-.\"O The kernel routine
-.\"O .BR printk ()
-.\"O will only print a message on the
-.\"O console, if it has a loglevel less than the value of the variable
-.\"O .IR console_loglevel .
-.\"O This variable initially has the value
-.\"O .B DEFAULT_CONSOLE_LOGLEVEL
-.\"O (7), but is set to 10 if the
-.\"O kernel command line contains the word "debug", and to 15 in case
-.\"O of a kernel fault (the 10 and 15 are just silly, and equivalent to 8).
-カーネル・ルーチンの
-.BR printk ()
-は、ログレベルが
-.I console_loglevel
-変数より小さいときにのみ、コンソールにメッセージを表示する。
-.I console_loglevel
-は最初
-.B DEFAULT_CONSOLE_LOGLEVEL
-(7) に設定されるが、起動時にカーネルの
-コマンド・ライン・オプションに "debug" という単語が含まれている場合は
-10 に設定され、カーネル・フォールトが発生した場合には 15 に設定される
-(但し、10 や 15 という数字に意味はなく、8 と同等である)。
-.\"O This variable is set (to a value in the range 1-8) by the call
-.\"O .IR syslog(8,dummy,value) .
-.\"O The calls
-.\"O .I syslog(type,dummy,dummy)
-.\"O with \fItype\fP equal to 6 or 7, set it to 1 (kernel panics only)
-.\"O or 7 (all except debugging messages), respectively.
-この変数は
-.IR syslog(8,dummy,value) .
-呼び出しによって設定され、値の範囲は 1-8 である。
-.I syslog(type,dummy,dummy)
-呼び出しで \fItype\fP が 6 もしくは 7 の場合、
-console_loglevel は 1 (カーネル・パニックのみ)、
-7 (デバッグ・メッセージ以外の全て) にそれぞれ設定される。
+カーネルは長さ \fBLOG_BUF_LEN\fP の巡回式のバッファを持っており、 それにはカーネル関数の \fBprintk\fP()
+の引き数として与えられた メッセージが (そのログレベルにかかわらず) 格納される。 初期のカーネルでは \fBLOG_BUF_LEN\fP の値は 4096
+であった。 カーネル 1.3.54 からは 8192、 カーネル 2.1.113 からは 16384 になり、 カーネル 2.4.23 以降および
+2.6 以降ではカーネル設定オプション (\fBCONFIG_LOG_BUF_SHIFT\fP)
+で値を設定できるようになっている。最近のカーネルでは、コマンド 10 (下記参照) でバッファのサイズを問い合わせできる。
+.SS コマンド
+\fItype\fP 引き数はこの関数が行う動作を決定する。 以下のリストに示す値を \fItype\fP に指定できる。
+シンボル名はカーネルソースで定義されているが、ユーザ空間には公開されていない。 したがって、数字を使うか、名前を自分で定義する必要がある。
+.TP
+\fBSYSLOG_ACTION_CLOSE\fP (0)
+ログをクローズする。現在のところ NOP である。
+.TP
+\fBSYSLOG_ACTION_OPEN\fP (1)
+ログをオープンする。現在のところ NOP である。
+.TP
+\fBSYSLOG_ACTION_READ\fP (2)
+ログを読み出す。 この呼び出しは、 カーネル・ログ・バッファが空でなくなるまで待って、 最大 \fIlen\fP バイトまで \fIbufp\fP
+が指すバッファに読み込み、 読み込んだバイト数を返す。 ログから読まれたバイトはログ・バッファから消える。 つまり、情報は一度しか読むことができない。
+これはユーザーのプログラムが \fI/proc/kmsg\fP を読んだ時にカーネルによって実行される関数でもある。
+.TP
+\fBSYSLOG_ACTION_READ_ALL\fP (3)
+リング・バッファに残っているメッセージをすべて読み出し、 \fIbufp\fP が指すバッファに格納する。 この呼び出しログ・バッファの最後の \fIlen\fP
+バイトを (非破壊的に) 読み出すが、 最後の「リング・バッファ消去」命令 (下記のコマンド 5 参照)
+以降にバッファに書き込まれた情報しか読み出せない。 返り値は読み込んだバイト数である。
+.TP
+\fBSYSLOG_ACTION_READ_CLEAR\fP (4)
+リング・バッファに残っているメッセージをすべて読み出し、クリアする。 この呼び出しは \fItype\fP 3
+と全く同じことを行い、追加で「リング・バッファ消去」 ("clear ring buffer") コマンドも実行する。
+.TP
+\fBSYSLOG_ACTION_CLEAR\fP (5)
+「リング・バッファ消去」 (\"clear ring buffer\") コマンドのみを実行する。 引き数 \fIbufp\fP と \fIlen\fP
+は無視される。
+.IP
+このコマンドは実際にリング・バッファをクリアするわけではなく、 コマンド 3 (\fBSYSLOG_ACTION_READ_ALL\fP) と 4
+(\fBSYSLOG_ACTION_READ_CLEAR\fP で返す内容を決定するカーネルの管理変数を設定する。 このコマンドはコマンド 2
+(\fBSYSLOG_ACTION_READ\fP) と 9 (\fBSYSLOG_ACTION_SIZE_UNREAD\fP) には影響を与えない。
+.TP
+\fBSYSLOG_ACTION_CONSOLE_OFF\fP (6)
+printk のコンソールへの出力を無効にする。 コンソールのログレベルを最小に設定し、 コンソールにメッセージが出力されないようにする。 引き数
+\fIbufp\fP と \fIlen\fP は無視される。
+.TP
+\fBSYSLOG_ACTION_CONSOLE_ON\fP (7)
+コンソールのログレベルをデフォルトに設定し、 コンソールにメッセージが表示されるようにする。 引き数 \fIbufp\fP と \fIlen\fP は無視される。
+.TP
+\fBSYSLOG_ACTION_CONSOLE_LEVEL\fP (8)
+コンソールのログレベルを \fIlen\fP で指定された値に設定する。 \fIlen\fP は 1 以上 8 以下の整数でなければならない。 詳細は
+\fBログレベル (loglevel)\fP の節を参照のこと。 引き数 \fIbufp\fP は無視される。
+.TP
+\fBSYSLOG_ACTION_SIZE_UNREAD\fP (9) (Linux 2.4.10 以降)
+コマンド 2 (\fBSYSLOG_ACTION_READ\fP) でカーネル・ログ・バッファから読み出せるバイト数を返す。 引き数 \fIbufp\fP と
+\fIlen\fP は無視される。
+.TP
+\fBSYSLOG_ACTION_SIZE_BUFFER\fP (10) (Linux 2.6.6 以降)
+カーネル・ログ・バッファの全体のサイズを返す。 引き数 \fIbufp\fP と \fIlen\fP は無視される。
+.PP
+コマンド種別 3 と 10 以外のコマンドは全て特権が必要である。
+バージョン 2.6.37 より前の Linux カーネルでは、
+コマンド種別 3 と 10 は非特権プロセスも呼び出すことができる。
+Linux 2.6.37 以降では、\fI/proc/sys/kernel/dmesg_restrict\fP が値 0 の場合に限り、
+非特権プロセスはこれらのコマンドを呼び出すことができる。
+Linux 2.6.37 より前では、「特権を持つ (privileged)」とは呼び出し者が
+\fBCAP_SYS_ADMIN\fP ケーパビリティを持つことを意味する。
+Linux 2.6.37 以降では、「特権を持つ」とは呼び出し者が
+\fBCAP_SYS_ADMIN\fP ケーパビリティか
+(新しい) \fBCAP_SYSLOG\fP ケーパビリティのいずれかを持つことを意味する
+(この目的で \fBCAP_SYS_ADMIN\fP ケーパビリティを使うのは今は非推奨である)。
+.SS "ログレベル (loglevel)"
+カーネル・ルーチンの \fBprintk\fP() は、ログレベルが \fIconsole_loglevel\fP
+変数より小さいときにのみ、コンソールにメッセージを表示する。 \fIconsole_loglevel\fP は最初
+\fBDEFAULT_CONSOLE_LOGLEVEL\fP (7) に設定されるが、起動時にカーネルの コマンド・ライン・オプションに "debug"
+という単語が含まれている場合は 10 に設定され、カーネル・フォールトが発生した場合には 15 に設定される (但し、10 や 15
+という数字に意味はなく、8 と同等である)。 この変数は \fItype\fP が 8 の \fBsyslog\fP() の呼び出しによって設定され、値の範囲は
+1\-8 である。 \fItype\fP が 6 もしくは 7 の \fBsyslog\fP() の呼び出しの場合、 console_loglevel は 1
+(カーネル・パニックのみ)、 7 (デバッグ・メッセージ以外の全て) にそれぞれ設定される。
-.\"O Every text line in a message has its own loglevel.
-.\"O This level is
-.\"O .I "DEFAULT_MESSAGE_LOGLEVEL \- 1"
-.\"O (6) unless the line starts with <d>
-.\"O where \fId\fP is a digit in the range 1-7, in which case the level
-.\"O is \fId\fP.
-.\"O The conventional meaning of the loglevel is defined in
-.\"O .I <linux/kernel.h>
-.\"O as follows:
-メッセージの各行はそれぞれにログレベルを持つ。このログレベルは
-.I "DEFAULT_MESSAGE_LOGLEVEL \- 1"
-(6) であるが、 <d> (\fId\fP は 1-7 の範囲の数字) で始まる行の
-ログレベルは \fId\fP である。
-ログレベルの慣習的な意味は
-.I <linux/kernel.h>
-に以下のように定義されている:
+メッセージの各行はそれぞれにログレベルを持つ。このログレベルは \fIDEFAULT_MESSAGE_LOGLEVEL \- 1\fP (6) であるが、
+<d> (\fId\fP は 1\-7 の範囲の数字) で始まる行の ログレベルは \fId\fP である。 ログレベルの慣習的な意味は
+\fI<linux/kernel.h>\fP に以下のように定義されている:
.nf
-.\"O #define KERN_EMERG "<0>" /* system is unusable */
-.\"O #define KERN_ALERT "<1>" /* action must be taken immediately */
-.\"O #define KERN_CRIT "<2>" /* critical conditions */
-.\"O #define KERN_ERR "<3>" /* error conditions */
-.\"O #define KERN_WARNING "<4>" /* warning conditions */
-.\"O #define KERN_NOTICE "<5>" /* normal but significant condition */
-.\"O #define KERN_INFO "<6>" /* informational */
-.\"O #define KERN_DEBUG "<7>" /* debug-level messages */
#define KERN_EMERG "<0>" /* システムが使用不能 */
#define KERN_ALERT "<1>" /* 直ちに対処が必要 */
#define KERN_CRIT "<2>" /* 致命的な状態 */
#define KERN_INFO "<6>" /* 通知 */
#define KERN_DEBUG "<7>" /* デバッグレベルの情報 */
.fi
-.\"O .SH "RETURN VALUE"
.SH 返り値
-.\"O For \fItype\fP equal to 2, 3, or 4, a successful call to
-.\"O .BR syslog ()
-.\"O returns the number
-.\"O of bytes read.
-.\"O For \fItype\fP 9,
-.\"O .BR syslog ()
-.\"O returns the number of bytes currently
-.\"O available to be read on the kernel log buffer.
-.\"O For \fItype\fP 10,
-.\"O .BR syslog ()
-.\"O returns the total size of the kernel log buffer.
-.\"O For other values of \fItype\fP, 0 is returned on success.
-\fItype\fP が 2, 3, 4 の場合、成功すると
-.BR syslog ()
-は読み出したバイト数を返す。
-\fItype\fP が 9 の場合、
-カーネル・ログバッファにある現在読み出し可能なバイト数を返す。
-\fItype\fP が 10 の場合、
-カーネル・ログバッファの総量を返す。
+\fItype\fP が 2, 3, 4 の場合、成功すると \fBsyslog\fP() は読み出したバイト数を返す。 \fItype\fP が 9 の場合、
+カーネル・ログ・バッファにある現在読み出し可能なバイト数を返す。 \fItype\fP が 10 の場合、 カーネル・ログ・バッファの総量を返す。
\fItype\fP がそれ以外の値の場合、成功すると 0 が返される。
-.\"O In case of error, \-1 is returned,
-.\"O and \fIerrno\fP is set to indicate the error.
-エラーの場合は、\-1\ が返り、
-\fIerrno\fP にエラーを示す値が設定される。
-.\"O .SH ERRORS
+エラーの場合は、\-1\ が返り、 \fIerrno\fP にエラーを示す値が設定される。
.SH エラー
-.TP
-.B EINVAL
-.\"O Bad arguments (e.g.,
-.\"O bad
-.\"O .IR type ;
-.\"O or for
-.\"O .I type
-.\"O 2, 3, or 4,
-.\"O .I buf
-.\"O is NULL,
-.\"O or
-.\"O .I len
-.\"O is less than zero; or for
-.\"O .I type
-.\"O 8, the
-.\"O .I level
-.\"O is outside the range 1 to 8).
-不正な引き数
-(具体的には、
-.I type
-が正しくない、もしくは
-.I type
-が 2, 3, 4 の場合に
-.I buf
-が NULL か
-.I len
-が 0 未満である、もしくは
-.I type
-が 8 の場合に
-.I level
-が 1 以上 8 以下の範囲に入っていない)。
-.TP
-.B ENOSYS
-.\"O This
-.\"O .BR syslog ()
-.\"O system call is not available, because the kernel was compiled with the
-.\"O .BR CONFIG_PRINTK
-.\"O kernel-configuration option disabled.
-カーネルの設定オプション
-.BR CONFIG_PRINTK
-を無効にしてカーネルがコンパイルされているため、
-.BR syslog ()
+.TP
+\fBEINVAL\fP
+不正な引き数 (具体的には、 \fItype\fP が正しくない、もしくは \fItype\fP が 2, 3, 4 の場合に \fIbuf\fP が NULL か
+\fIlen\fP が 0 未満である、もしくは \fItype\fP が 8 の場合に \fIlevel\fP が 1 以上 8 以下の範囲に入っていない)。
+.TP
+\fBENOSYS\fP
+カーネルの設定オプション \fBCONFIG_PRINTK\fP を無効にしてカーネルがコンパイルされているため、 \fBsyslog\fP()
システムコールが利用できない。
-.TP
-.B EPERM
-.\"O An attempt was made to change console_loglevel or clear the kernel
-.\"O message ring buffer by a process without sufficient privilege
-.\"O (more precisely: without the
-.\"O .B CAP_SYS_ADMIN
-.\"O capability).
-十分な権限を持たないプロセス (正確には
-.B CAP_SYS_ADMIN
-ケーパビリティを持たないプロセス) が console_loglevelを変更しようとしたか、
+.TP
+\fBEPERM\fP
+十分な権限を持たないプロセス (正確にはケーパビリティ \fBCAP_SYS_ADMIN\fP も
+\fBCAP_SYSLOG\fP も持たないプロセス) が console_loglevel を変更しようとしたか、
カーネル・メッセージ・リングを消去しようとした。
-.TP
-.B ERESTARTSYS
-.\"O System call was interrupted by a signal - nothing was read.
-.\"O (This can be seen only during a trace.)
-システム・コールがシグナルによって割り込まれ、何も読み出せなかった。
-(トレース中にしか発生することはない)
-.\"O .SH "CONFORMING TO"
+.TP
+\fBERESTARTSYS\fP
+システム・コールがシグナルによって割り込まれ、何も読み出せなかった。 (トレース中にしか発生することはない)
.SH 準拠
-.\"O This system call is Linux-specific and should not be used in programs
-.\"O intended to be portable.
-このシステム・コールは Linux 特有であり、移植を意図したプログラムでは
-使用してはいけない。
-.\"O .SH NOTES
+このシステム・コールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけない。
.SH 注意
-.\"O From the very start people noted that it is unfortunate that
-.\"O a system call and a library routine of the same name are entirely
-.\"O different animals.
-.\"O In libc4 and libc5 the number of this call was defined by
-.\"O .BR SYS_klog .
-.\"O In glibc 2.0 the syscall is baptized
-.\"O .BR klogctl ().
-かなり初期の頃から、同じ名前を持つシステム・コールと
-ライブラリ・ルーチンが全く異なる代物であるのは不幸なことだと
-気付かれていた。
-libc4 と libc5 ではこのコールの番号は
-.B SYS_klog
-と定義されていた。
-glibc2.0 でこのシステムコールは
-.BR klogctl ()
-という名前に改められた。
-.\"O .SH "SEE ALSO"
+.\" In libc4 and libc5 the number of this call was defined by
+.\" .BR SYS_klog .
+.\" In glibc 2.0 the syscall is baptized
+.\" .BR klogctl ().
+かなり初期の頃から、同じ名前を持つシステムコールとライブラリルーチンが
+全く異なる別物であるのは不幸なことだと指摘されてきた。
.SH 関連項目
-.BR syslog (3)
+\fBsyslog\fP(3), \fBcapabilities\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。