Name

console — Controls ABLE console.

Synopsis

console [-a, --add {driver}] [-d, --drivers] [-s, --level [level]] [-l, --list] [-h, --help]

Options

-a, --add

adds a new console driver to those currently active.

-d, --drivers

shows all available display drivers which can be used with the -a switch.

-s, --level

sets the logging level to new value (if given) and displays the current logging level.

-l, --list

lists the currently active consoles.

-h, --help

displays the short help text and exits.

Description

This command is used to manipulate the ABLE console system. At boot, the active console is determined by the console.read and console.write values. The console command allows the current active console sources to be altered while the system is running.

The console command allows the level of messages displayed (“logged”) on the console to be altered.

Any messages with a level lower than the current log level will be output to the console. For example, if the logging level is set to 6 all messages except those of level Log and Debug will be shown.

The initial log level is controlled by console.level and defaults to 6 if the variable is unset.

Table 6. Defined console log levels

LevelValueDescription
Critical0Critical errors that will prevent proper continued operation of ABLE
Error1Error messages
Warn3Warning messages
Info5Messages which give more information about an operation
Log7Messages which are the result of normal operation
Debug9Debugging messages, these will rarely be seen on non debugging releases of ABLE.

Example 29. Using the console command

This example shows the use of the console command and its switches. First all the available drivers are listed, then the current log level is displayed and changed. Finally the active drivers are listed, a new driver added and listed again to show the addition was successful.

>console -d
(-w-a)  s3c2410x-video
(r---)  usbkbd
(rw--)  null
(-w--)  all-wr
(r---)  all-rd
(rw--)  serial
(rw--)  (s3c2410_serial2)
(rw--)  (s3c2410_serial1)
(rw--)  (s3c2410_serial0)
>console -s
Current console level 6
>console -s 4
Changing log level 6 to 4
>console -l
Console (write):
all write:
 => s3c2410x-video: S3C24XX Framebuffer (640x480 @ 60Hz, 31.5 KHz)
 => null: NULL
 => serial: low level serial
Console (read):
all read:
 => usbkbd: USB Keyboard Driver
 => null: NULL
 => serial: low level serial
>console -a (s3c2410_serial1)
adding console (s3c2410_serial1)
>console -l
Console (write):
all write:
 => (s3c2410_serial1): fd (s3c2410_serial1)
 => s3c2410x-video: S3C24XX Framebuffer (640x480 @ 60Hz, 31.5 KHz)
 => null: NULL
 => serial: low level serial
Console (read):
all read:
 => (s3c2410_serial1): fd (s3c2410_serial1)
 => usbkbd: USB Keyboard Driver
 => null: NULL
 => serial: low level serial
>