LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.





Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.



klogd

klogd [options]

System administration command. Control which kernel messages are displayed on the console, prioritize all messages, and log them through syslogd. On many operating systems, syslogd performs all the work of klogd, but on Linux the features are separated. Kernel messages are gleaned from the /proc filesystem and from system calls to syslogd. By default, no messages appear on the console. Messages are sorted into eight levels, 0-7, and the level number is prepended to each message.

Priority levels

0

Emergency situation (KERN_EMERG).

1

A crucial error has occurred (KERN_ALERT).

2

A serious error has occurred (KERN_CRIT).

3

An error has occurred (KERN_ERR).

4

A warning message (KERN_WARNING).

5

The situation is normal but should be checked (KERN_NOTICE).

6

Information only (KERN_INFO).

7

Debugging message (KERN_DEBUG).

Options

-c level

Print all messages of a higher priority (lower number) than level to the console.

-d

Debugging mode.

-f file

Print all messages to file; suppress normal logging.

-i

Signal executing daemon to reload kernel module symbols.

-k file

Use file as source of kernel symbols.

-n

Avoid auto-backgrounding. This is needed when klogd is started from init.

-o

One-shot mode. Prioritize and log all current messages, then immediately exit.

-p

Reload kernel-module symbol information whenever an Oops string is detected.

-s

Suppress reading of messages from the /proc filesystem. Read from kernel message buffers instead.

-v

Print version, then exit.

-x

Don't translate instruction pointers (EIP). klogd will not read the System.map file.

-I

Signal executing daemon to reload both static kernel symbols and kernel module symbols.

-2

Print two lines for each symbol, one showing the symbol and the other showing its numerical value (address).

Files

/usr/include/linux/kernel.h, /usr/include/sys/syslog.h

Sources for definitions of each logging level.

/proc/kmsg

A file examined by klogd for messages.

/var/run/klogd.pid

klogd's process ID.