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 how
For more details and examples, see the
This parameter specifies which log levels to log. The specified level, and all levels that are more severe, will be logged.
The default value is
To change the global log level at run-time, use
If this parameter is set to true, then the
The default value is
See chapter
This configuration option only effects the
If
If
The default value is
This configuration option only effects the
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
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
The time
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.
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 OTP-21, a new API for logging was added to Erlang/OTP. The
old
The following application configuration parameters can still be set, but they will only be used if the corresponding new logger variables are not set.
erl -kernel logger '[{handler,default,logger_std_h,#{logger_std_h=>#{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