.\" 2008-02-15, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Update LOG_BUF_LEN details; update RETURN VALUE section.
.\"
-.TH SYSLOG 2 2015-05-07 "Linux" "Linux Programmer's Manual"
+.TH SYSLOG 2 2017-09-15 "Linux" "Linux Programmer's Manual"
.SH NAME
syslog, klogctl \- read and/or clear kernel message ring buffer;
set console_loglevel
.B " /* No wrapper provided in glibc */"
.PP
/* The glibc interface */
-.br
.B "#include <sys/klog.h>"
.PP
.BI "int klogctl(int " type ", char *" bufp ", int " len );
see
.BR syslog (3)
for details.
-
+.PP
This page describes the kernel
.BR syslog ()
system call, which is used to control the kernel
See the discussion of
.IR /proc/sys/kernel/printk ,
below.
-
+.IP
The
.I bufp
and
See the discussion of
.IR /proc/sys/kernel/printk ,
below.
-
+.IP
The
.I bufp
and
of a kernel fault (the 10 and 15 are just silly, and equivalent to 8).
The value of
.IR console_loglevel
-can be set (to a value in the range 1-8) by a
+can be set (to a value in the range 1\(en8) by a
.BR syslog ()
call with a
.I type
KERN_INFO 6 Informational
KERN_DEBUG 7 Debug-level messages
.TE
-
+.sp 1
The kernel
.IR printk()
routine will print a message on the
.BR syslog ()
returns the total size of the kernel log buffer.
For other values of \fItype\fP, 0 is returned on success.
-
+.PP
In case of error, \-1 is returned,
and \fIerrno\fP is set to indicate the error.
.SH ERRORS