Section 9.2. Console Options


9.2. Console Options

These options deal with the console or kernel log, where kernel debugging and error information are displayed.


Output console device and options.


console=Options


tty n

Use the virtual console device n.


ttyS n[, options] , ttyUSB0[, options]

Use the specified serial port. The options are of the form bbbbpnf, where bbbb is the baud rate, p is parity (n, o, or e), n is number of bits, and f is flow control (r for RTS or omitted). Default is 9600n8.

See the file Documentation/serial-console.txt for more information on how to use a serial console. If you wish to have access to the kernel console information and do not have a serial port, see the netconsole command-line option.


uart,io, addr[, options] , uart,mmio, addr[, options]

Start an early, polled-mode console on the 8250/16550 UART at the specified I/O port or MMIO address, switching to the specified ttyS device later. The options are the same as for ttyS shown earlier.


Output console data across the network.


netconsole= [src-port]@ [src-ip]/ [dev], [target-port]@ target-ip/ [target-mac-address]

Send kernel console data across the network using UDP packets to another machine. Options are:


src-port

Source port for the UDP packets. The default value is 6665.


src-ip

Source IP address of the interface to use.


dev

Network interface to use. eth0 is an example. The network interface can also run normal network traffic, because the netconsole data is not intrusive and should cause no slowdown in other network operations.


target-port

Port that the logging agent will use. The default value is 6666.


target-ip

IP address for the logging agent.


target-mac-address

Ethernet MAC address for the logging agent.

To listen to this data, the remote machine can use the syslogd program, or run the netcat program as follows:

 netcat -u -l -p port 

For more background on how to use this option, see the file Documentation/networking/netconsole.txt.


Enable kernel debugging.

Cause the kernel log level to be set to the debug level, so that all debug messages will be printed to the console at boot time.


Disable all log messages.

Set the default kernel log level to KERN_WARNING (4), which suppresses all messages during boot except extremely serious ones. (Log levels are defined under the loglevel parameter.)


Show early boot messages.


earlyprintk= [vga|serial][,ttyS n[,baudrate]][,keep ]

Show kernel log messages that precede the initialization of the traditional console. These messages are typically never seen on the console unless you use this option. Enabling this can be very useful for tracking down hardware issues. Currently, the option can specify either the VGA device or the serial port, but not both at the same time. Also, only the ttyS0 or ttyS1 serial devices will work. Interaction with the standard serial driver is not very good, and the VGA output will eventually be overwritten by the real console.

Append ,keep in order not to disable the messages shown by this option when the real kernel console is initialized and takes over the system.


Set the default console log level.


loglevel= level

Specify the initial console log level. Any log messages with levels less than this (that is, of higher priority) will be printed to the console, whereas any messages with levels equal to or greater than this will not be displayed.

The console log level can also be changed by the klogd program, or by writing the specified level to the /proc/sys/kernel/printk file.

The kernel log levels are:


0 (KERN_EMERG)

The system is unusable.


1 (KERN_ALERT)

Actions that must be taken care of immediately.


2 (KERN_CRIT)

Critical conditions.


3 (KERN_ERR)

Noncritical error conditions.


4 (KERN_WARNING)

Warning conditions that should be taken care of.


5 (KERN_NOTICE)

Normal, but significant events.


6 (KERN_INFO)

Informational messages that require no action.


7 (KERN_DEBUG)

Kernel debugging messages, output by the kernel if the developer enabled debugging at compile time.


Set the size of the kernel log buffer.


log_buf_len= n[KMG ]

Set the size of the kernel's internal log buffer. n must be a power of 2, if not, it will be rounded up to be a power of 2. This value can also be changed by the CONFIG_LOG_BUF_SHIFT kernel configuration value.


Debug the initcall functions in the kernel.

Cause the kernel to trace all functions that are called by the kernel during initialization of the system as the kernel boots. This option is useful for determining where the kernel is dying during startup.


How many words of the stack to print in kernel oopses.


kstack= n

Specify how many words from the kernel stack should be printed in the kernel oops dumps. n is an integer value.


Show timing data on every kernel log message.

Cause the kernel to prefix every kernel log message with a timestamp.



Linux Kernel in a Nutshell
Linux Kernel in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596100795
EAN: 2147483647
Year: 2004
Pages: 113

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net