The Kernel application has all the code necessary to run the Erlang runtime system: file servers, code servers, and so on.
The Kernel application is the first application started. It is mandatory in the sense that the minimal system based on Erlang/OTP consists of Kernel and STDLIB. Kernel contains the following functional areas:
Two standard logger handlers are defined in
the Kernel application. These are described in the
Asynchronous OS signals may be subscribed to via the Kernel applications event manager
(see
The default handler will halt Erlang and produce a crashdump
with slogan "Received SIGUSR1".
This is equivalent to calling
The default handler will halt Erlang immediately.
This is equivalent to calling
The default handler will terminate Erlang normally.
This is equivalent to calling
Any event handler added to
Hangup detected on controlling terminal or death of controlling process
Quit from keyboard
Abort signal from abort
Timer signal from alarm
Termination signal
User-defined signal 1
User-defined signal 2
Child process stopped or terminated
Stop process
Stop typed at terminal
Setting OS signals are described in
The following configuration parameters are defined for the Kernel
application. For more information about configuration parameters,
see file
Specifies which applications that are distributed and on which nodes they are allowed to execute. In this parameter:
The parameter is described in
Specifies when nodes are automatically connected. If
this parameter is not specified, a node is always
automatically connected, for example, when a message is to be sent to
that node.
Connections are never automatically established, they
must be explicitly connected. See
Connections are established automatically, but only
once per node. If a node goes down, it must thereafter be
explicitly connected. See
Specifies the default permission for applications when they are started. In this parameter:
Permissions are described in
Specifies the configuration
for
The
Specifies the primary log level for Logger. Log events with
the same, or a more severe level, pass through the primary
log level check. See
section
To change the primary log level at runtime, use
Defaults to
Specifies if Logger behaves backwards compatible with the SASL error logging functionality from releases prior to Erlang/OTP 21.0.
If this parameter is set to
See section
See section
Defaults to
If this parameter is set to
Defines global groups, see
Specifies default options for
Specifies default options for
If the host of an Erlang node has many network interfaces,
this parameter specifies which one to listen on. For the type definition
of
Defines the
Defines a list of extra socket options to be used when opening the
listening socket for a distributed Erlang node.
See
Defines a list of extra socket options to be used when connecting to
other distributed Erlang nodes.
See
If set, no log events are issued when erroneous lines are found and skipped in the various Inet configuration files.
The name (string) of an Inet user configuration file. For details,
see section
Notice that this value does not limit the total connection setup time, but rather each individual network operation during the connection setup and handshake.
Specifies the
Once every
As the availability is only checked every
MinT = TickTime - TickTime / 4
MaxT = TickTime + TickTime / 4
Notice that all communicating nodes are to have the
same
Normally, a terminating node is detected immediately by the transport protocol (like TCP/IP).
Specifies the time
Specifies which other nodes that must be alive
for this node to start properly. If some node in the list
does not start within the specified time, this node does not
start either. If this parameter is undefined, it defaults to
Specifies which other nodes that can be alive for this node to start properly. If some node in this list does not start within the specified time, this node starts anyway. If this parameter is undefined, it defaults to the empty list.
Specifies the time (in milliseconds) that this node
waits for the mandatory and optional nodes to start. If
this parameter is undefined, no node synchronization is
performed. This option ensures that
Starts the
Defaults to
Starts the
Defaults to
If configuration parameter
where
Examples of
Defaults to
Starts the
Defaults to
Starts the
Defaults to
Starts the
Defaults to
Specifies whether shell history should be logged to disk
between usages of
Specific log lines that should not be persisted. For
example
how many bytes the shell should remember. By default, the value is set to 512kb, and the minimal value is 50kb.
Specifies where the shell history files will be stored.
defaults to the user's cache directory as returned by
Where:
Sets a function that
Where:
Specifies a list of rules for use by
The interpretation of
In Erlang/OTP 21.0, a new API for logging was added. The
old
The following application configuration parameters can still be set, but they are only used if the corresponding configuration parameters for Logger are not set.
erl -kernel logger '[{handler,default,logger_std_h,#{config=>#{type=>{file,"/tmp/erlang.log"}}}}]'
erl -kernel logger '[{handler,default,logger_std_h,#{formatter=>{logger_formatter,#{legacy_header=>true,template=>[{logger_formatter,header},"\n",msg,"\n"],depth=>10}}}]'
See