1 .\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Written 11 June 1995 by Andries Brouwer <aeb@cwi.nl>
24 .\" 2008-02-15, Jeremy Kerr <jk@ozlabs.org>
25 .\" Add info on command type 10; add details on types 6, 7, 8, & 9.
26 .\" 2008-02-15, Michael Kerrisk <mtk.manpages@gmail.com>
27 .\" Update LOG_BUF_LEN details; update RETURN VALUE section.
29 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
30 .\" all rights reserved.
31 .\" Translated Mon Dec 16 11:16:34 JST 2001
32 .\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
33 .\" Updated Thu Mar 6 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
34 .\" Updated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
35 .\" Updated 2008-04-04, Akihiro MOTOKI, LDP v2.79
36 .\" Updated 2008-07-31, Akihiro MOTOKI, LDP v3.05
38 .\"WORD: kernel ¥«¡¼¥Í¥ë
39 .\"WORD: message ring buffer ¥á¥Ã¥»¡¼¥¸¡¦¥ê¥ó¥°¡¦¥Ð¥Ã¥Õ¥¡
40 .\"WORD: library ¥é¥¤¥Ö¥é¥ê
41 .\"WORD: kernel log buffer ¥«¡¼¥Í¥ë¡¦¥í¥°¡¦¥Ð¥Ã¥Õ¥¡
42 .\"WORD: console ¥³¥ó¥½¡¼¥ë
43 .\"WORD: kernel panic ¥«¡¼¥Í¥ë¡¦¥Ñ¥Ë¥Ã¥¯
44 .\"WORD: loglevel ¥í¥°¥ì¥Ù¥ë
45 .\"WORD: debug message ¥Ç¥Ð¥Ã¥°¡¦¥á¥Ã¥»¡¼¥¸
47 .TH SYSLOG 2 2008-06-20 "Linux" "Linux Programmer's Manual"
50 .\"O syslog, klogctl \- read and/or clear kernel message ring buffer;
51 .\"O set console_loglevel
52 syslog, klogctl \- ¥«¡¼¥Í¥ë¤Î¥á¥Ã¥»¡¼¥¸¡¦¥ê¥ó¥°¡¦¥Ð¥Ã¥Õ¥¡¤òÆɤó¤À¤ê¾Ãµî¤·¤¿¤ê¤¹¤ë;
53 console_loglevel ¤ÎÀßÄê¤ò¹Ô¤¦
57 .BI "int syslog(int " type ", char *" bufp ", int " len );
58 .\"O .B " /* No wrapper provided in glibc */"
59 .B " /* glibc ¤Ç¤Ï¥é¥Ã¥Ñ¡¼´Ø¿ô¤ÏÄ󶡤µ¤ì¤Æ¤¤¤Ê¤¤ */"
61 .\"O /* The glibc interface */
62 /* glibc ¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹ */
64 .B "#include <sys/klog.h>"
66 .BI "int klogctl(int " type ", char *" bufp ", int " len );
70 .\"O If you need the C library function
73 .\"O .BR syslogd (8)),
76 .\"O The system call of this name is about controlling the kernel
78 .\"O buffer, and the glibc version is called
81 ¤ÈÏä¹) C ¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Î
86 ¤³¤Î̾Á°¤Î¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï¥«¡¼¥Í¥ë¤Î
88 ¥Ð¥Ã¥Õ¥¡¤òÀ©¸æ¤¹¤ë¤â¤Î¤Ç¤¢¤ê¡¢glibc ¤Ç¤Ï
92 .\"O .The \fItype\fP argument determines the action taken by this function.
93 \fItype\fP °ú¤¿ô¤Ï¤³¤Î´Ø¿ô¤ÎÆ°ºî¤ò·èÄꤹ¤ë¡£
96 .\"O .IR kernel/printk.c :
101 .\"O * Commands to sys_syslog:
103 .\"O * 0 \-\- Close the log. Currently a NOP.
104 .\"O * 1 \-\- Open the log. Currently a NOP.
105 .\"O * 2 \-\- Read from the log.
106 .\"O * 3 \-\- Read all messages remaining in the ring buffer.
107 .\"O * 4 \-\- Read and clear all messages remaining in the ring buffer
108 .\"O * 5 \-\- Clear ring buffer.
109 .\"O * 6 \-\- Disable printk to console
110 .\"O * 7 \-\- Enable printk to console
111 .\"O * 8 \-\- Set level of messages printed to console
112 .\"O * 9 \-\- Return number of unread characters in the log buffer
113 .\"O * 10 \-\- Return size of the log buffer
116 * Commands to sys_syslog:
118 * 0 \-\- ¥í¥°¤òÊĤ¸¤ë¡£¸½ºß¤Î¼ÂÁõ¤Ç¤Ï²¿¤â¤·¤Ê¤¤ (NOP) ¡£
119 * 1 \-\- ¥í¥°¤ò³«¤¯¡£¸½ºß¤Î¼ÂÁõ¤Ç¤Ï²¿¤â¤·¤Ê¤¤ (NOP) ¡£
120 * 2 \-\- ¥í¥°¤«¤éÆɤ߽Ф¹¡£
121 * 3 \-\- ¥ê¥ó¥°¡¦¥Ð¥Ã¥Õ¥¡¤Ë»Ä¤Ã¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¤ò¤¹¤Ù¤ÆÆɤ߽Ф¹¡£
122 * 4 \-\- ¥ê¥ó¥°¡¦¥Ð¥Ã¥Õ¥¡¤Ë»Ä¤Ã¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¤ò¤¹¤Ù¤ÆÆɤ߽Ф·¡¢¾Ãµî¤¹¤ë¡£
123 * 5 \-\- ¥ê¥ó¥°¥Ð¥Ã¥Õ¥¡¤ò¾Ãµî¤¹¤ë¡£
124 * 6 \-\- ¥³¥ó¥½¡¼¥ë¤Ø¤Î printk ¤ò̵¸ú¤Ë¤¹¤ë¡£
125 * 7 \-\- ¥³¥ó¥½¡¼¥ë¤Ø¤Î printk ¤ò͸ú¤Ë¤¹¤ë¡£
126 * 8 \-\- ¥³¥ó¥½¡¼¥ë¤Ëɽ¼¨¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¤Î¥ì¥Ù¥ë¤òÀßÄꤹ¤ë¡£
127 * 9 \-\- ¥í¥°¥Ð¥Ã¥Õ¥¡¤Î̤ÆɤÎʸ»ú¿ô¤òÊÖ¤¹¡£
128 * 10 \-\- ¥í¥°¥Ð¥Ã¥Õ¥¡¤Î¥µ¥¤¥º¤òÊÖ¤¹¡£
132 .\"O Only command types 3 and 10 are allowed to unprivileged processes.
133 .\"O Type 9 was added in 2.4.10; type 10 in 2.6.6.
134 ÈóÆø¢¥×¥í¥»¥¹¤Ë¤Ï¥³¥Þ¥ó¥É 3 ¤È 10 ¤Î¤ß¤¬µö²Ä¤µ¤ì¤Æ¤¤¤ë
135 (¥³¥Þ¥ó¥É 9 ¤Ï Linux 2.4.10 ¤Ç¡¢¥³¥Þ¥ó¥É 10 ¤Ï Linux 2.6.6 ¤ÇÄɲ䵤줿)¡£
136 .\"O .SS The kernel log buffer
137 .SS ¥«¡¼¥Í¥ë¡¦¥í¥°¡¦¥Ð¥Ã¥Õ¥¡ (kernel log buffer)
138 .\"O The kernel has a cyclic buffer of length
140 .\"O in which messages given as arguments to the kernel function
142 .\"O are stored (regardless of their loglevel).
143 .\"O In early kernels,
145 .\"O had the value 4096;
146 .\"O from kernel 1.3.54, it was 8192;
147 .\"O from kernel 2.1.113 it was 16384;
148 .\"O since 2.4.23/2.6 the value is a kernel configuration option.
149 .\"O .\" Under "General setup" ==> "Kernel log buffer size"
150 .\"O .\" For 2.6, precisely the option seems to have appeared in 2.5.55.
151 .\"O In recent kernels the size can be queried with command type 10.
154 ¤Î½ä²ó¼°¤Î¥Ð¥Ã¥Õ¥¡¤ò»ý¤Ã¤Æ¤ª¤ê¡¢
155 ¤½¤ì¤Ë¤Ï¥«¡¼¥Í¥ë´Ø¿ô¤Î
157 ¤Î°ú¤¿ô¤È¤·¤ÆÍ¿¤¨¤é¤ì¤¿
158 ¥á¥Ã¥»¡¼¥¸¤¬ (¤½¤Î¥í¥°¥ì¥Ù¥ë¤Ë¤«¤«¤ï¤é¤º) ³ÊǼ¤µ¤ì¤ë¡£
161 ¤ÎÃÍ¤Ï 4096 ¤Ç¤¢¤Ã¤¿¡£
162 ¥«¡¼¥Í¥ë 1.3.54 ¤«¤é¤Ï 8192¡¢
163 ¥«¡¼¥Í¥ë 2.1.113 ¤«¤é¤Ï 16384 ¤Ë¤Ê¤ê¡¢
164 ¥«¡¼¥Í¥ë 2.4.23 °Ê¹ß¤ª¤è¤Ó 2.6 °Ê¹ß¤Ç¤Ï¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë»þ¤Ë
165 ÃͤòÀßÄê¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
166 .\" Under "General setup" ==> "Kernel log buffer size"
167 .\" For 2.6, precisely the option seems to have appeared in 2.5.55.
168 ºÇ¶á¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢¥³¥Þ¥ó¥É 10 ¤Ç¥Ð¥Ã¥Õ¥¡¤Î¥µ¥¤¥º¤òÌ䤤¹ç¤ï¤»¤Ç¤¤ë¡£
171 .\"O .I "syslog(2,buf,len)"
172 .\"O waits until this kernel log buffer is nonempty, and then reads
173 .\"O at most \fIlen\fP bytes into the buffer \fIbuf\fP.
175 .\"O the number of bytes read.
176 .\"O Bytes read from the log disappear from
177 .\"O the log buffer: the information can only be read once.
178 .\"O This is the function executed by the kernel when a user program
180 .\"O .IR /proc/kmsg .
181 .I "syslog(2,buf,len)"
182 ¤Î¸Æ¤Ó½Ð¤·¤Ï¥«¡¼¥Í¥ë¡¦¥í¥°¡¦¥Ð¥Ã¥Õ¥¡¤¬¶õ¤Ç¤Ê¤¯¤Ê¤ë¤Þ¤ÇÂԤäơ¢
183 ºÇÂç \fIlen\fP ¥Ð¥¤¥È¤Þ¤Ç \fIbuf\fP ¤Ø¤ÈÆɤ߽Ф·¡¢Æɤ߹þ¤ó¤À
184 ¥Ð¥¤¥È¿ô¤òÊÖ¤¹¡£¥í¥°¤«¤éÆɤޤ줿¥Ð¥¤¥È¤Ï¥í¥°¡¦¥Ð¥Ã¥Õ¥¡¤«¤é¾Ã¤¨¤ë:
185 ¾ðÊó¤Ï°ìÅÙ¤·¤«Æɤळ¤È¤¬¤Ç¤¤Ê¤¤¡£
186 ¤³¤ì¤Ï¥æ¡¼¥¶¡¼¤Î¥×¥í¥°¥é¥à¤¬
188 ¤òÆɤó¤À»þ¤Ë¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤Æ¼Â¹Ô¤µ¤ì¤ë´Ø¿ô¤Ç¤â¤¢¤ë¡£
191 .\"O .I syslog(3,buf,len)
192 .\"O will read the last \fIlen\fP bytes from the log buffer (nondestructively),
193 .\"O but will not read more than was written into the buffer since the
194 .\"O last "clear ring buffer" command (which does not clear the buffer at all).
195 .\"O It returns the number of bytes read.
197 ¤Î¸Æ¤Ó½Ð¤·¤Ï¥í¥°¡¦¥Ð¥Ã¥Õ¥¡¤ÎºÇ¸å¤Î \fIlen\fP ¥Ð¥¤¥È¤ò
198 (ÈóÇ˲õŪ¤Ë)Æɤ߽Ф¹¡¢¤·¤«¤·¡¢Ä¾¶á¤Î¡Ö¥ê¥ó¥°¡¦¥Ð¥Ã¥Õ¥¡¾Ãµî¡×Ì¿Îá
199 (¤³¤ÎÌ¿Îá¤Ï¥Ð¥Ã¥Õ¥¡¤ò¾Ãµî¤¹¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤)
200 °Ê¹ß¤Ë¥Ð¥Ã¥Õ¥¡¤Ë½ñ¤¹þ¤Þ¤ì¤¿¾ðÊó¤·¤«Æɤ߽Ф»¤Ê¤¤¡£
201 ÊÖ¤êÃͤÏÆɤ߹þ¤ó¤À¥Ð¥¤¥È¿ô¤Ç¤¢¤ë¡£
204 .\"O .I syslog(4,buf,len)
205 .\"O does precisely the same, but also executes the "clear ring buffer" command.
207 ¸Æ¤Ó½Ð¤·¤Ï¡Ö¥ê¥ó¥°¡¦¥Ð¥Ã¥Õ¥¡¾Ãµî¡×Ì¿Îá¤â¼Â¹Ô¤¹¤ë°Ê³°¤Ï
208 µ¡Ç½ 3 ¤È´°Á´¤ËƱ¤¸¤Ç¤¢¤ë¡£
211 .\"O .I syslog(5,dummy,dummy)
212 .\"O executes just the "clear ring buffer" command.
213 .\"O (In each call where
217 .\"O is shown as "dummy", the value of the argument is ignored by the call.)
218 .I syslog(5,dummy,dummy)
219 ¸Æ¤Ó½Ð¤·¤Ï¡Ö¥ê¥ó¥°¡¦¥Ð¥Ã¥Õ¥¡¾Ãµî¡×Ì¿Îá¤Î¤ß¤ò¼Â¹Ô¤¹¤ë
224 ¤¬ "dummy" ¤ÈµºÜ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¤½¤Î°ú¤¿ô¤ÎÃͤ¬Ìµ»ë¤µ¤ì¤ë¤³¤È¤òɽ¤¹)¡£
227 .\"O .I syslog(6,dummy,dummy)
228 .\"O sets the console log level to minimum, so that no messages are printed
230 .I syslog(6,dummy,dummy)
231 ¸Æ¤Ó½Ð¤·¤Ï¥³¥ó¥½¡¼¥ë¤Î¥í¥°¥ì¥Ù¥ë¤òºÇ¾®¤ËÀßÄꤷ¡¢
232 ¥³¥ó¥½¡¼¥ë¤Ë¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¡£
235 .\"O .I syslog(7,dummy,dummy)
236 .\"O sets the console log level to default, so that messages are printed
238 .I syslog(7,dummy,dummy)
239 ¸Æ¤Ó½Ð¤·¤Ï¥³¥ó¥½¡¼¥ë¤Î¥í¥°¥ì¥Ù¥ë¤ò¥Ç¥Õ¥©¥ë¥È¤ËÀßÄꤷ¡¢
240 ¥³¥ó¥½¡¼¥ë¤Ë¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤¹¤ë¡£
243 .\"O .I syslog(8,dummy,level)
244 .\"O sets the console log level to
246 .\"O which must be an integer between 1 and 8 (inclusive).
249 .\"O section for details.
250 .I syslog(8,dummy,level)
251 ¸Æ¤Ó½Ð¤·¤Ï¥³¥ó¥½¡¼¥ë¤Î¥í¥°¥ì¥Ù¥ë¤ò
255 ¤Ï 1 °Ê¾å 8 °Ê²¼¤ÎÀ°¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
257 .B ¥í¥°¥ì¥Ù¥ë (loglevel)
261 .\"O .I syslog(9,dummy,dummy)
262 .\"O returns the number of bytes currently available to be read
263 .\"O on the kernel log buffer.
264 .I syslog(9,dummy,dummy)
265 ¸Æ¤Ó½Ð¤·¤Ï¥«¡¼¥Í¥ë¡¦¥í¥°¥Ð¥Ã¥Õ¥¡¤Ë¤¢¤ë¸½ºßÆɤ߽Ф·²Äǽ¤Ê¥Ð¥¤¥È¿ô¤òÊÖ¤¹¡£
268 .\"O .I syslog(10,dummy,dummy)
269 .\"O returns the total size of the kernel log buffer.
270 .I syslog(10,dummy,dummy)
271 ¸Æ¤Ó½Ð¤·¤Ï¥«¡¼¥Í¥ë¡¦¥í¥°¥Ð¥Ã¥Õ¥¡¤ÎÁíÎ̤òÊÖ¤¹¡£
272 .\"O .SS The loglevel
273 .SS ¥í¥°¥ì¥Ù¥ë (loglevel)
274 .\"O The kernel routine
276 .\"O will only print a message on the
277 .\"O console, if it has a loglevel less than the value of the variable
278 .\"O .IR console_loglevel .
279 .\"O This variable initially has the value
280 .\"O .B DEFAULT_CONSOLE_LOGLEVEL
281 .\"O (7), but is set to 10 if the
282 .\"O kernel command line contains the word "debug", and to 15 in case
283 .\"O of a kernel fault (the 10 and 15 are just silly, and equivalent to 8).
288 ÊÑ¿ô¤è¤ê¾®¤µ¤¤¤È¤¤Ë¤Î¤ß¡¢¥³¥ó¥½¡¼¥ë¤Ë¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤¹¤ë¡£
291 .B DEFAULT_CONSOLE_LOGLEVEL
292 (7) ¤ËÀßÄꤵ¤ì¤ë¤¬¡¢µ¯Æ°»þ¤Ë¥«¡¼¥Í¥ë¤Î
293 ¥³¥Þ¥ó¥É¡¦¥é¥¤¥ó¡¦¥ª¥×¥·¥ç¥ó¤Ë "debug" ¤È¤¤¤¦Ã±¸ì¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï
294 10 ¤ËÀßÄꤵ¤ì¡¢¥«¡¼¥Í¥ë¡¦¥Õ¥©¡¼¥ë¥È¤¬È¯À¸¤·¤¿¾ì¹ç¤Ë¤Ï 15 ¤ËÀßÄꤵ¤ì¤ë
295 (⤷¡¢10 ¤ä 15 ¤È¤¤¤¦¿ô»ú¤Ë°ÕÌ£¤Ï¤Ê¤¯¡¢8 ¤ÈƱÅù¤Ç¤¢¤ë)¡£
296 .\"O This variable is set (to a value in the range 1-8) by the call
297 .\"O .IR syslog(8,dummy,value) .
299 .\"O .I syslog(type,dummy,dummy)
300 .\"O with \fItype\fP equal to 6 or 7, set it to 1 (kernel panics only)
301 .\"O or 7 (all except debugging messages), respectively.
303 .IR syslog(8,dummy,value) .
304 ¸Æ¤Ó½Ð¤·¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¡¢ÃͤÎÈÏ°Ï¤Ï 1-8 ¤Ç¤¢¤ë¡£
305 .I syslog(type,dummy,dummy)
306 ¸Æ¤Ó½Ð¤·¤Ç \fItype\fP ¤¬ 6 ¤â¤·¤¯¤Ï 7 ¤Î¾ì¹ç¡¢
307 console_loglevel ¤Ï 1 (¥«¡¼¥Í¥ë¡¦¥Ñ¥Ë¥Ã¥¯¤Î¤ß)¡¢
308 7 (¥Ç¥Ð¥Ã¥°¡¦¥á¥Ã¥»¡¼¥¸°Ê³°¤ÎÁ´¤Æ) ¤Ë¤½¤ì¤¾¤ìÀßÄꤵ¤ì¤ë¡£
310 .\"O Every text line in a message has its own loglevel.
312 .\"O .I "DEFAULT_MESSAGE_LOGLEVEL \- 1"
313 .\"O (6) unless the line starts with <d>
314 .\"O where \fId\fP is a digit in the range 1-7, in which case the level
316 .\"O The conventional meaning of the loglevel is defined in
317 .\"O .I <linux/kernel.h>
319 ¥á¥Ã¥»¡¼¥¸¤Î³Æ¹Ô¤Ï¤½¤ì¤¾¤ì¤Ë¥í¥°¥ì¥Ù¥ë¤ò»ý¤Ä¡£¤³¤Î¥í¥°¥ì¥Ù¥ë¤Ï
320 .I "DEFAULT_MESSAGE_LOGLEVEL \- 1"
321 (6) ¤Ç¤¢¤ë¤¬¡¢ <d> (\fId\fP ¤Ï 1-7 ¤ÎÈϰϤοô»ú) ¤Ç»Ï¤Þ¤ë¹Ô¤Î
322 ¥í¥°¥ì¥Ù¥ë¤Ï \fId\fP ¤Ç¤¢¤ë¡£
323 ¥í¥°¥ì¥Ù¥ë¤Î´·½¬Åª¤Ê°ÕÌ£¤Ï
325 ¤Ë°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë:
328 .\"O #define KERN_EMERG "<0>" /* system is unusable */
329 .\"O #define KERN_ALERT "<1>" /* action must be taken immediately */
330 .\"O #define KERN_CRIT "<2>" /* critical conditions */
331 .\"O #define KERN_ERR "<3>" /* error conditions */
332 .\"O #define KERN_WARNING "<4>" /* warning conditions */
333 .\"O #define KERN_NOTICE "<5>" /* normal but significant condition */
334 .\"O #define KERN_INFO "<6>" /* informational */
335 .\"O #define KERN_DEBUG "<7>" /* debug-level messages */
336 #define KERN_EMERG "<0>" /* ¥·¥¹¥Æ¥à¤¬»ÈÍÑÉÔǽ */
337 #define KERN_ALERT "<1>" /* ľ¤Á¤ËÂн褬ɬÍ× */
338 #define KERN_CRIT "<2>" /* Ã×̿Ū¤Ê¾õÂÖ */
339 #define KERN_ERR "<3>" /* ¥¨¥é¡¼¾õÂÖ */
340 #define KERN_WARNING "<4>" /* ·Ù¹ð¾õÂÖ */
341 #define KERN_NOTICE "<5>" /* Ä̾ï¾õÂÖ¤À¤¬Âç»ö¤Ê¾ðÊó */
342 #define KERN_INFO "<6>" /* ÄÌÃÎ */
343 #define KERN_DEBUG "<7>" /* ¥Ç¥Ð¥Ã¥°¥ì¥Ù¥ë¤Î¾ðÊó */
345 .\"O .SH "RETURN VALUE"
347 .\"O For \fItype\fP equal to 2, 3, or 4, a successful call to
349 .\"O returns the number
351 .\"O For \fItype\fP 9,
353 .\"O returns the number of bytes currently
354 .\"O available to be read on the kernel log buffer.
355 .\"O For \fItype\fP 10,
357 .\"O returns the total size of the kernel log buffer.
358 .\"O For other values of \fItype\fP, 0 is returned on success.
359 \fItype\fP ¤¬ 2, 3, 4 ¤Î¾ì¹ç¡¢À®¸ù¤¹¤ë¤È
361 ¤ÏÆɤ߽Ф·¤¿¥Ð¥¤¥È¿ô¤òÊÖ¤¹¡£
362 \fItype\fP ¤¬ 9 ¤Î¾ì¹ç¡¢
363 ¥«¡¼¥Í¥ë¡¦¥í¥°¥Ð¥Ã¥Õ¥¡¤Ë¤¢¤ë¸½ºßÆɤ߽Ф·²Äǽ¤Ê¥Ð¥¤¥È¿ô¤òÊÖ¤¹¡£
364 \fItype\fP ¤¬ 10 ¤Î¾ì¹ç¡¢
365 ¥«¡¼¥Í¥ë¡¦¥í¥°¥Ð¥Ã¥Õ¥¡¤ÎÁíÎ̤òÊÖ¤¹¡£
366 \fItype\fP ¤¬¤½¤ì°Ê³°¤ÎÃͤξì¹ç¡¢À®¸ù¤¹¤ë¤È 0 ¤¬ÊÖ¤µ¤ì¤ë¡£
368 .\"O In case of error, \-1 is returned,
369 .\"O and \fIerrno\fP is set to indicate the error.
370 ¥¨¥é¡¼¤Î¾ì¹ç¤Ï¡¢\-1\ ¤¬Ê֤ꡢ
371 \fIerrno\fP ¤Ë¥¨¥é¡¼¤ò¼¨¤¹Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
376 .\"O Bad arguments (e.g.,
386 .\"O is less than zero; or for
390 .\"O is outside the range 1 to 8).
394 ¤¬Àµ¤·¤¯¤Ê¤¤¡¢¤â¤·¤¯¤Ï
400 ¤¬ 0 ̤Ëþ¤Ç¤¢¤ë¡¢¤â¤·¤¯¤Ï
404 ¤¬ 1 °Ê¾å 8 °Ê²¼¤ÎÈϰϤËÆþ¤Ã¤Æ¤¤¤Ê¤¤)¡£
409 .\"O system call is not available, because the kernel was compiled with the
410 .\"O .BR CONFIG_PRINTK
411 .\"O kernel-configuration option disabled.
412 ¥«¡¼¥Í¥ë¤ÎÀßÄꥪ¥×¥·¥ç¥ó
414 ¤ò̵¸ú¤Ë¤·¤Æ¥«¡¼¥Í¥ë¤¬¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢
416 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬ÍøÍѤǤ¤Ê¤¤¡£
419 .\"O An attempt was made to change console_loglevel or clear the kernel
420 .\"O message ring buffer by a process without sufficient privilege
421 .\"O (more precisely: without the
422 .\"O .B CAP_SYS_ADMIN
424 ½½Ê¬¤Ê¸¢¸Â¤ò»ý¤¿¤Ê¤¤¥×¥í¥»¥¹ (Àµ³Î¤Ë¤Ï
426 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò»ý¤¿¤Ê¤¤¥×¥í¥»¥¹) ¤¬ console_loglevel¤òÊѹ¹¤·¤è¤¦¤È¤·¤¿¤«¡¢
427 ¥«¡¼¥Í¥ë¡¦¥á¥Ã¥»¡¼¥¸¡¦¥ê¥ó¥°¤ò¾Ãµî¤·¤è¤¦¤È¤·¤¿¡£
430 .\"O System call was interrupted by a signal - nothing was read.
431 .\"O (This can be seen only during a trace.)
432 ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤¬¥·¥°¥Ê¥ë¤Ë¤è¤Ã¤Æ³ä¤ê¹þ¤Þ¤ì¡¢²¿¤âÆɤ߽Ф»¤Ê¤«¤Ã¤¿¡£
433 (¥È¥ì¡¼¥¹Ãæ¤Ë¤·¤«È¯À¸¤¹¤ë¤³¤È¤Ï¤Ê¤¤)
434 .\"O .SH "CONFORMING TO"
436 .\"O This system call is Linux-specific and should not be used in programs
437 .\"O intended to be portable.
438 ¤³¤Î¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï Linux ÆÃͤǤ¢¤ê¡¢°Ü¿¢¤ò°Õ¿Þ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï
442 .\"O From the very start people noted that it is unfortunate that
443 .\"O a system call and a library routine of the same name are entirely
444 .\"O different animals.
445 .\"O In libc4 and libc5 the number of this call was defined by
447 .\"O In glibc 2.0 the syscall is baptized
449 ¤«¤Ê¤ê½é´ü¤Îº¢¤«¤é¡¢Æ±¤¸Ì¾Á°¤ò»ý¤Ä¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤È
450 ¥é¥¤¥Ö¥é¥ê¡¦¥ë¡¼¥Á¥ó¤¬Á´¤¯°Û¤Ê¤ëÂåʪ¤Ç¤¢¤ë¤Î¤ÏÉÔ¹¬¤Ê¤³¤È¤À¤È
452 libc4 ¤È libc5 ¤Ç¤Ï¤³¤Î¥³¡¼¥ë¤ÎÈÖ¹æ¤Ï
455 glibc2.0 ¤Ç¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
457 ¤È¤¤¤¦Ì¾Á°¤Ë²þ¤á¤é¤ì¤¿¡£