.TH kernel 7 "kernel 3.0.3" "Ericsson AB" "Erlang Application Definition" .SH NAME kernel \- The Kernel Application .SH DESCRIPTION .LP 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\&. The Kernel application contains the following services: .RS 2 .TP 2 * application controller, see \fBapplication(3erl)\fR\& .LP .TP 2 * \fIcode\fR\& .LP .TP 2 * \fIdisk_log\fR\& .LP .TP 2 * \fIdist_ac\fR\&, distributed application controller .LP .TP 2 * \fIerl_boot_server\fR\& .LP .TP 2 * \fIerl_ddll\fR\& .LP .TP 2 * \fIerror_logger\fR\& .LP .TP 2 * \fIfile\fR\& .LP .TP 2 * \fIglobal\fR\& .LP .TP 2 * \fIglobal_group\fR\& .LP .TP 2 * \fIheart\fR\& .LP .TP 2 * \fIinet\fR\& .LP .TP 2 * \fInet_kernel\fR\& .LP .TP 2 * \fIos\fR\& .LP .TP 2 * \fIpg2\fR\& .LP .TP 2 * \fIrpc\fR\& .LP .TP 2 * \fIseq_trace\fR\& .LP .TP 2 * \fIuser\fR\& .LP .RE .SH "ERROR LOGGER EVENT HANDLERS" .LP Two standard error logger event handlers are defined in the Kernel application\&. These are described in \fBerror_logger(3erl)\fR\&\&. .SH "CONFIGURATION" .LP The following configuration parameters are defined for the Kernel application\&. See \fBapp(5)\fR\& for more information about configuration parameters\&. .RS 2 .TP 2 .B \fIbrowser_cmd = string() | {M,F,A}\fR\&: When pressing the Help button in a tool such as Debugger or TV, the help text (an HTML file \fIFile\fR\&) is by default displayed in a Netscape browser which is required to be up and running\&. This parameter can be used to change the command for how to display the help text if another browser than Netscape is preferred, or another platform than Unix or Windows is used\&. .RS 2 .LP If set to a string \fICommand\fR\&, the command \fI"Command File"\fR\& will be evaluated using \fIos:cmd/1\fR\&\&. .RE .RS 2 .LP If set to a module-function-args tuple \fI{M,F,A}\fR\&, the call \fIapply(M,F,[File|A])\fR\& will be evaluated\&. .RE .TP 2 .B \fIdistributed = [Distrib]\fR\&: Specifies which applications are distributed and on which nodes they may execute\&. In this parameter: .RS 2 .TP 2 * \fIDistrib = {App,Nodes} | {App,Time,Nodes}\fR\& .LP .TP 2 * \fIApp = atom()\fR\& .LP .TP 2 * \fITime = integer()>0\fR\& .LP .TP 2 * \fINodes = [node() | {node(),\&.\&.\&.,node()}]\fR\& .LP .RE .RS 2 .LP The parameter is described in \fBapplication(3erl)\fR\&, function \fIload/2\fR\&\&. .RE .TP 2 .B \fIdist_auto_connect = Value\fR\&: Specifies when nodes will be automatically connected\&. If this parameter is not specified, a node is always automatically connected, e\&.g when a message is to be sent to that node\&. \fIValue\fR\& is one of: .RS 2 .TP 2 .B \fInever\fR\&: Connections are never automatically established, they must be explicitly connected\&. See \fBnet_kernel(3erl)\fR\&\&. .TP 2 .B \fIonce\fR\&: Connections will be established automatically, but only once per node\&. If a node goes down, it must thereafter be explicitly connected\&. See \fBnet_kernel(3erl)\fR\&\&. .RE .TP 2 .B \fIpermissions = [Perm]\fR\&: Specifies the default permission for applications when they are started\&. In this parameter: .RS 2 .TP 2 * \fIPerm = {ApplName,Bool}\fR\& .LP .TP 2 * \fIApplName = atom()\fR\& .LP .TP 2 * \fIBool = boolean()\fR\& .LP .RE .RS 2 .LP Permissions are described in \fBapplication(3erl)\fR\&, function \fIpermit/2\fR\&\&. .RE .TP 2 .B \fIerror_logger = Value\fR\&: \fIValue\fR\& is one of: .RS 2 .TP 2 .B \fItty\fR\&: Installs the standard event handler which prints error reports to \fIstdio\fR\&\&. This is the default option\&. .TP 2 .B \fI{file, FileName}\fR\&: Installs the standard event handler which prints error reports to the file \fIFileName\fR\&, where \fIFileName\fR\& is a string\&. .TP 2 .B \fIfalse\fR\&: No standard event handler is installed, but the initial, primitive event handler is kept, printing raw event messages to tty\&. .TP 2 .B \fIsilent\fR\&: Error logging is turned off\&. .RE .TP 2 .B \fIglobal_groups = [GroupTuple]\fR\&: Defines global groups, see \fBglobal_group(3erl)\fR\&\&. .RS 2 .TP 2 * \fIGroupTuple = {GroupName, [Node]} | {GroupName, PublishType, [Node]}\fR\& .LP .TP 2 * \fIGroupName = atom()\fR\& .LP .TP 2 * \fIPublishType = normal | hidden\fR\& .LP .TP 2 * \fINode = node()\fR\& .LP .RE .TP 2 .B \fIinet_default_connect_options = [{Opt, Val}]\fR\&: Specifies default options for \fIconnect\fR\& sockets, see \fBinet(3erl)\fR\&\&. .TP 2 .B \fIinet_default_listen_options = [{Opt, Val}]\fR\&: Specifies default options for \fIlisten\fR\& (and \fIaccept\fR\&) sockets, see \fBinet(3erl)\fR\&\&. .TP 2 .B \fI{inet_dist_use_interface, ip_address()}\fR\&: If the host of an Erlang node has several network interfaces, this parameter specifies which one to listen on\&. See \fBinet(3erl)\fR\& for the type definition of \fIip_address()\fR\&\&. .TP 2 .B \fI{inet_dist_listen_min, First}\fR\&: See below\&. .TP 2 .B \fI{inet_dist_listen_max, Last}\fR\&: Define the \fIFirst\&.\&.Last\fR\& port range for the listener socket of a distributed Erlang node\&. .TP 2 .B \fIinet_parse_error_log = silent\fR\&: If this configuration parameter is set, no \fIerror_logger\fR\& messages are generated when erroneous lines are found and skipped in the various Inet configuration files\&. .TP 2 .B \fIinetrc = Filename\fR\&: The name (string) of an Inet user configuration file\&. See ERTS User\&'s Guide, Inet configuration\&. .TP 2 .B \fInet_setuptime = SetupTime\fR\&: .RS 2 .LP \fISetupTime\fR\& must be a positive integer or floating point number, and will be interpreted as the maximally allowed time for each network operation during connection setup to another Erlang node\&. The maximum allowed value is 120; if higher values are given, 120 will be used\&. The default value if the variable is not given, or if the value is incorrect (e\&.g\&. not a number), is 7 seconds\&. .RE .RS 2 .LP Note that this value does not limit the total connection setup time, but rather each individual network operation during the connection setup and handshake\&. .RE .TP 2 .B \fInet_ticktime = TickTime\fR\&: .RS 2 .LP Specifies the \fInet_kernel\fR\& tick time\&. \fITickTime\fR\& is given in seconds\&. Once every \fITickTime/4\fR\& second, all connected nodes are ticked (if anything else has been written to a node) and if nothing has been received from another node within the last four (4) tick times that node is considered to be down\&. This ensures that nodes which are not responding, for reasons such as hardware errors, are considered to be down\&. .RE .RS 2 .LP The time \fIT\fR\&, in which a node that is not responding is detected, is calculated as: \fIMinT < T < MaxT\fR\& where: .RE .LP .nf MinT = TickTime - TickTime / 4 MaxT = TickTime + TickTime / 4 .fi .RS 2 .LP \fITickTime\fR\& is by default 60 (seconds)\&. Thus, \fI45 < T < 75\fR\& seconds\&. .RE .RS 2 .LP \fINote:\fR\& All communicating nodes should have the same \fITickTime\fR\& value specified\&. .RE .RS 2 .LP \fINote:\fR\& Normally, a terminating node is detected immediately\&. .RE .TP 2 .B \fIshutdown_timeout = integer() | infinity\fR\&: Specifies the time \fIapplication_controller\fR\& will wait for an application to terminate during node shutdown\&. If the timer expires, \fIapplication_controller\fR\& will brutally kill \fIapplication_master\fR\& of the hanging application\&. If this parameter is undefined, it defaults to \fIinfinity\fR\&\&. .TP 2 .B \fIsync_nodes_mandatory = [NodeName]\fR\&: Specifies which other nodes \fImust\fR\& be alive in order for this node to start properly\&. If some node in the list does not start within the specified time, this node will not start either\&. If this parameter is undefined, it defaults to []\&. .TP 2 .B \fIsync_nodes_optional = [NodeName]\fR\&: Specifies which other nodes \fIcan\fR\& be alive in order 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\&. .TP 2 .B \fIsync_nodes_timeout = integer() | infinity\fR\&: Specifies the amount of time (in milliseconds) this node will wait for the mandatory and optional nodes to start\&. If this parameter is undefined, no node synchronization is performed\&. This option also makes sure that \fIglobal\fR\& is synchronized\&. .TP 2 .B \fIstart_dist_ac = true | false\fR\&: Starts the \fIdist_ac\fR\& server if the parameter is \fItrue\fR\&\&. This parameter should be set to \fItrue\fR\& for systems that use distributed applications\&. .RS 2 .LP The default value is \fIfalse\fR\&\&. If this parameter is undefined, the server is started if the parameter \fIdistributed\fR\& is set\&. .RE .TP 2 .B \fIstart_boot_server = true | false\fR\&: Starts the \fIboot_server\fR\& if the parameter is \fItrue\fR\& (see \fBerl_boot_server(3erl)\fR\&)\&. This parameter should be set to \fItrue\fR\& in an embedded system which uses this service\&. .RS 2 .LP The default value is \fIfalse\fR\&\&. .RE .TP 2 .B \fIboot_server_slaves = [SlaveIP]\fR\&: If the \fIstart_boot_server\fR\& configuration parameter is \fItrue\fR\&, this parameter can be used to initialize \fIboot_server\fR\& with a list of slave IP addresses\&. \fISlaveIP = string() | atom | {integer(),integer(),integer(),integer()}\fR\& .RS 2 .LP where \fI0 <= integer() <=255\fR\&\&. .RE .RS 2 .LP Examples of \fISlaveIP\fR\& in atom, string and tuple form are: .br \fI\&'150\&.236\&.16\&.70\&', "150,236,16,70", {150,236,16,70}\fR\&\&. .RE .RS 2 .LP The default value is \fI[]\fR\&\&. .RE .TP 2 .B \fIstart_disk_log = true | false\fR\&: Starts the \fIdisk_log_server\fR\& if the parameter is \fItrue\fR\& (see \fBdisk_log(3erl)\fR\&)\&. This parameter should be set to true in an embedded system which uses this service\&. .RS 2 .LP The default value is \fIfalse\fR\&\&. .RE .TP 2 .B \fIstart_pg2 = true | false\fR\&: Starts the \fIpg2\fR\& server (see \fBpg2(3erl)\fR\&) if the parameter is \fItrue\fR\&\&. This parameter should be set to \fItrue\fR\& in an embedded system which uses this service\&. .RS 2 .LP The default value is \fIfalse\fR\&\&. .RE .TP 2 .B \fIstart_timer = true | false\fR\&: Starts the \fItimer_server\fR\& if the parameter is \fItrue\fR\& (see \fBtimer(3erl)\fR\&)\&. This parameter should be set to \fItrue\fR\& in an embedded system which uses this service\&. .RS 2 .LP The default value is \fIfalse\fR\&\&. .RE .TP 2 .B \fIshutdown_func = {Mod, Func}\fR\&: Where: .RS 2 .TP 2 * \fIMod = atom()\fR\& .LP .TP 2 * \fIFunc = atom()\fR\& .LP .RE .RS 2 .LP Sets a function that \fIapplication_controller\fR\& calls when it starts to terminate\&. The function is called as: \fIMod:Func(Reason)\fR\&, where \fIReason\fR\& is the terminate reason for \fIapplication_controller\fR\&, and it must return as soon as possible for \fIapplication_controller\fR\& to terminate properly\&. .RE .RE .SH "SEE ALSO" .LP \fBapp(5)\fR\&, \fBapplication(3erl)\fR\&, \fBcode(3erl)\fR\&, \fBdisk_log(3erl)\fR\&, \fBerl_boot_server(3erl)\fR\&, \fBerl_ddll(3erl)\fR\&, \fBerror_logger(3erl)\fR\&, \fBfile(3erl)\fR\&, \fBglobal(3erl)\fR\&, \fBglobal_group(3erl)\fR\&, \fBheart(3erl)\fR\&, \fBinet(3erl)\fR\&, \fBnet_kernel(3erl)\fR\&, \fBos(3erl)\fR\&, \fBpg2(3erl)\fR\&, \fBrpc(3erl)\fR\&, \fBseq_trace(3erl)\fR\&, \fBtimer(3erl)\fR\&, \fBuser(3erl)\fR\&