<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
<year>1996</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
</legalnotice>
<title>erl</title>
<prepared></prepared>
<docno></docno>
<date></date>
<rev></rev>
<file>erl.xml</file>
</header>
<com>erl</com>
<comsummary>The Erlang Emulator</comsummary>
<description>
<p>The <c><![CDATA[erl]]></c> program starts an Erlang runtime system.
The exact details (for example, whether <c><![CDATA[erl]]></c> is a script or
a program and which other programs it calls) are system-dependent.</p>
<p>Windows users probably wants to use the <c><![CDATA[werl]]></c> program
instead, which runs in its own window with scrollbars and supports
command-line editing. The <c><![CDATA[erl]]></c> program on Windows provides
no line editing in its shell, and on Windows 95 there is no way
to scroll back to text which has scrolled off the screen.
The <c><![CDATA[erl]]></c> program must be used, however, in pipelines or if
you want to redirect standard input or output.</p>
<note><p>As of ERTS version 5.9 (OTP-R15B) the runtime system will by
default <em>not</em> bind schedulers to logical processors.
For more information see documentation of the
<seealso marker="#+sbt">+sbt</seealso> system flag.
</p>
</note>
</description>
<funcs>
<func>
<name>erl <arguments></name>
<fsummary>Start an Erlang runtime system</fsummary>
<desc>
<p>Starts an Erlang runtime system.</p>
<p>The arguments can be divided into <em>emulator flags</em>,
<em>flags</em> and <em>plain arguments</em>:</p>
<list type="bulleted">
<item>
<p>Any argument starting with the character <c><![CDATA[+]]></c> is
interpreted as an <seealso marker="#emu_flags">emulator flag</seealso>.</p>
<p>As indicated by the name, emulator flags controls
the behavior of the emulator.</p>
</item>
<item>
<p>Any argument starting with the character <c><![CDATA[-]]></c>
(hyphen) is interpreted as a
<seealso marker="#init_flags">flag</seealso> which should
be passed to the Erlang part of the runtime system, more
specifically to the <c><![CDATA[init]]></c> system process, see
<seealso marker="init">init(3)</seealso>.</p>
<p>The <c><![CDATA[init]]></c> process itself interprets some of these
flags, the <em>init flags</em>. It also stores any
remaining flags, the <em>user flags</em>. The latter can
be retrieved by calling <c><![CDATA[init:get_argument/1]]></c>.</p>
<p>It can be noted that there are a small number of "-"
flags which now actually are emulator flags, see
the description below.</p>
</item>
<item>
<p>Plain arguments are not interpreted in any way. They are
also stored by the <c><![CDATA[init]]></c> process and can be
retrieved by calling <c><![CDATA[init:get_plain_arguments/0]]></c>.
Plain arguments can occur before the first flag, or after
a <c><![CDATA[--]]></c> flag. Additionally, the flag <c><![CDATA[-extra]]></c>
causes everything that follows to become plain arguments.</p>
</item>
</list>
<p>Example:</p>
<pre>
% <input>erl +W w -sname arnie +R 9 -s my_init -extra +bertie</input>
(arnie@host)1> <input>init:get_argument(sname).</input>
{ok,[["arnie"]]}
(arnie@host)2> <input>init:get_plain_arguments().</input>
["+bertie"]</pre>
<p>Here <c><![CDATA[+W w]]></c> and <c><![CDATA[+R 9]]></c> are emulator flags.
<c><![CDATA[-s my_init]]></c> is an init flag, interpreted by <c><![CDATA[init]]></c>.
<c><![CDATA[-sname arnie]]></c> is a user flag, stored by <c><![CDATA[init]]></c>.
It is read by Kernel and will cause the Erlang runtime system
to become distributed. Finally, everything after <c><![CDATA[-extra]]></c>
(that is, <c><![CDATA[+bertie]]></c>) is considered as plain arguments.</p>
<pre>
% <input>erl -myflag 1</input>
1> <input>init:get_argument(myflag).</input>
{ok,[["1"]]}
2> <input>init:get_plain_arguments().</input>
[]</pre>
<p>Here the user flag <c><![CDATA[-myflag 1]]></c> is passed to and stored
by the <c><![CDATA[init]]></c> process. It is a user defined flag,
presumably used by some user defined application.</p>
</desc>
</func>
</funcs>
<section>
<marker id="init_flags"></marker>
<title>Flags</title>
<p>In the following list, init flags are marked (init flag).
Unless otherwise specified, all other flags are user flags, for
which the values can be retrieved by calling
<c><![CDATA[init:get_argument/1]]></c>. Note that the list of user flags is
not exhaustive, there may be additional, application specific
flags which instead are documented in the corresponding
application documentation.</p>
<taglist>
<tag><c><![CDATA[--]]></c>(init flag)</tag>
<item>
<p>Everything following <c><![CDATA[--]]></c> up to the next flag
(<c><![CDATA[-flag]]></c> or <c><![CDATA[+flag]]></c>) is considered plain arguments
and can be retrieved using <c><![CDATA[init:get_plain_arguments/0]]></c>.</p>
</item>
<tag><c><![CDATA[-Application Par Val]]></c></tag>
<item>
<p>Sets the application configuration parameter <c><![CDATA[Par]]></c> to
the value <c><![CDATA[Val]]></c> for the application <c><![CDATA[Application]]></c>,
see <seealso marker="kernel:app">app(4)</seealso> and
<seealso marker="kernel:application">application(3)</seealso>.</p>
</item>
<tag><marker id="args_file"><c><![CDATA[-args_file FileName]]></c></marker></tag>
<item>
<p>Command line arguments are read from the file <c><![CDATA[FileName]]></c>.
The arguments read from the file replace the
'<c><![CDATA[-args_file FileName]]></c>' flag on the resulting command line.</p>
<p>The file <c><![CDATA[FileName]]></c> should be a plain text file and may
contain comments and command line arguments. A comment begins
with a # character and continues until next end of line character.
Backslash (\\) is used as quoting character. All command line
arguments accepted by <c><![CDATA[erl]]></c> are allowed, also the
<c><![CDATA[-args_file FileName]]></c> flag. Be careful not to cause circular
dependencies between files containing the <c><![CDATA[-args_file]]></c> flag,
though.</p>
<p>The <c><![CDATA[-extra]]></c> flag is treated specially. Its scope ends
at the end of the file. Arguments following an <c><![CDATA[-extra]]></c>
flag are moved on the command line into the <c><![CDATA[-extra]]></c> section,
i.e. the end of the command line following after an <c><![CDATA[-extra]]></c>
flag.</p>
</item>
<tag><c><![CDATA[-async_shell_start]]></c></tag>
<item>
<p>The initial Erlang shell does not read user input until
the system boot procedure has been completed (Erlang 5.4 and
later). This flag disables the start synchronization feature
and lets the shell start in parallel with the rest of
the system.</p>
</item>
<tag><c><![CDATA[-boot File]]></c></tag>
<item>
<p>Specifies the name of the boot file, <c><![CDATA[File.boot]]></c>,
which is used to start the system. See
<seealso marker="init">init(3)</seealso>. Unless
<c><![CDATA[File]]></c> contains an absolute path, the system searches
for <c><![CDATA[File.boot]]></c> in the current and <c><![CDATA[$ROOT/bin]]></c>
directories.</p>
<p>Defaults to <c><![CDATA[$ROOT/bin/start.boot]]></c>.</p>
</item>
<tag><c><![CDATA[-boot_var Var Dir]]></c></tag>
<item>
<p>If the boot script contains a path variable <c><![CDATA[Var]]></c> other
than <c><![CDATA[$ROOT]]></c>, this variable is expanded to <c><![CDATA[Dir]]></c>.
Used when applications are installed in another directory
than <c><![CDATA[$ROOT/lib]]></c>, see
<seealso marker="sasl:systools#make_script/1">systools:make_script/1,2</seealso>.</p>
</item>
<tag><c><![CDATA[-code_path_cache]]></c></tag>
<item>
<p>Enables the code path cache of the code server, see
<seealso marker="kernel:code">code(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-compile Mod1 Mod2 ...]]></c></tag>
<item>
<p>Compiles the specified modules and then terminates (with
non-zero exit code if the compilation of some file did not
succeed). Implies <c><![CDATA[-noinput]]></c>. Not recommended - use
<seealso marker="erlc">erlc</seealso> instead.</p>
</item>
<tag><c><![CDATA[-config Config]]></c></tag>
<item>
<p>Specifies the name of a configuration file,
<c><![CDATA[Config.config]]></c>, which is used to configure
applications. See
<seealso marker="kernel:app">app(4)</seealso> and
<seealso marker="kernel:application">application(3)</seealso>.</p>
</item>
<tag><marker id="connect_all"><c><![CDATA[-connect_all false]]></c></marker></tag>
<item>
<p>If this flag is present, <c><![CDATA[global]]></c> will not maintain a
fully connected network of distributed Erlang nodes, and then
global name registration cannot be used. See
<seealso marker="kernel:global">global(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-cookie Cookie]]></c></tag>
<item>
<p>Obsolete flag without any effect and common misspelling for
<c><![CDATA[-setcookie]]></c>. Use <c><![CDATA[-setcookie]]></c> instead.</p>
</item>
<tag><c><![CDATA[-detached]]></c></tag>
<item>
<p>Starts the Erlang runtime system detached from the system
console. Useful for running daemons and backgrounds processes. Implies
<c><![CDATA[-noinput]]></c>.</p>
</item>
<tag><c><![CDATA[-emu_args]]></c></tag>
<item>
<p>Useful for debugging. Prints out the actual arguments
sent to the emulator.</p>
</item>
<tag><c><![CDATA[-env Variable Value]]></c></tag>
<item>
<p>Sets the host OS environment variable <c><![CDATA[Variable]]></c> to
the value <c><![CDATA[Value]]></c> for the Erlang runtime system.
Example:</p>
<pre>
% <input>erl -env DISPLAY gin:0</input></pre>
<p>In this example, an Erlang runtime system is started with
the <c><![CDATA[DISPLAY]]></c> environment variable set to <c><![CDATA[gin:0]]></c>.</p>
</item>
<tag><c><![CDATA[-eval Expr]]></c>(init flag)</tag>
<item>
<p>Makes <c><![CDATA[init]]></c> evaluate the expression <c><![CDATA[Expr]]></c>, see
<seealso marker="init">init(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-extra]]></c>(init flag)</tag>
<item>
<p>Everything following <c><![CDATA[-extra]]></c> is considered plain
arguments and can be retrieved using
<c><![CDATA[init:get_plain_arguments/0]]></c>.</p>
</item>
<tag><c><![CDATA[-heart]]></c></tag>
<item>
<p>Starts heart beat monitoring of the Erlang runtime system.
See <seealso marker="kernel:heart">heart(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-hidden]]></c></tag>
<item>
<p>Starts the Erlang runtime system as a hidden node, if it is
run as a distributed node. Hidden nodes always establish
hidden connections to all other nodes except for nodes in the
same global group. Hidden connections are not published on
either of the connected nodes, i.e. neither of the connected
nodes are part of the result from <c><![CDATA[nodes/0]]></c> on the other
node. See also hidden global groups,
<seealso marker="kernel:global_group">global_group(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-hosts Hosts]]></c></tag>
<item>
<p>Specifies the IP addresses for the hosts on which Erlang
boot servers are running, see
<seealso marker="kernel:erl_boot_server">erl_boot_server(3)</seealso>.
This flag is mandatory if the <c><![CDATA[-loader inet]]></c> flag is
present.</p>
<p>The IP addresses must be given in the standard form (four
decimal numbers separated by periods, for example
<c><![CDATA["150.236.20.74"]]></c>. Hosts names are not acceptable, but
a broadcast address (preferably limited to the local network)
is.</p>
</item>
<tag><c><![CDATA[-id Id]]></c></tag>
<item>
<p>Specifies the identity of the Erlang runtime system. If it is
run as a distributed node, <c><![CDATA[Id]]></c> must be identical to
the name supplied together with the <c><![CDATA[-sname]]></c> or
<c><![CDATA[-name]]></c> flag.</p>
</item>
<tag><c><![CDATA[-init_debug]]></c></tag>
<item>
<p>Makes <c><![CDATA[init]]></c> write some debug information while
interpreting the boot script.</p>
</item>
<tag><marker id="instr"><c><![CDATA[-instr]]></c>(emulator flag)</marker></tag>
<item>
<p>Selects an instrumented Erlang runtime system (virtual
machine) to run, instead of the ordinary one. When running an
instrumented runtime system, some resource usage data can be
obtained and analysed using the module <c><![CDATA[instrument]]></c>.
Functionally, it behaves exactly like an ordinary Erlang
runtime system.</p>
</item>
<tag><c><![CDATA[-loader Loader]]></c></tag>
<item>
<p>Specifies the method used by <c><![CDATA[erl_prim_loader]]></c> to load
Erlang modules into the system. See
<seealso marker="erl_prim_loader">erl_prim_loader(3)</seealso>.
Two <c><![CDATA[Loader]]></c> methods are supported, <c><![CDATA[efile]]></c> and
<c><![CDATA[inet]]></c>. <c><![CDATA[efile]]></c> means use the local file system,
this is the default. <c><![CDATA[inet]]></c> means use a boot server on
another machine, and the <c><![CDATA[-id]]></c>, <c><![CDATA[-hosts]]></c> and
<c><![CDATA[-setcookie]]></c> flags must be specified as well. If
<c><![CDATA[Loader]]></c> is something else, the user supplied
<c><![CDATA[Loader]]></c> port program is started.</p>
</item>
<tag><c><![CDATA[-make]]></c></tag>
<item>
<p>Makes the Erlang runtime system invoke <c><![CDATA[make:all()]]></c> in
the current working directory and then terminate. See
<seealso marker="tools:make">make(3)</seealso>. Implies
<c><![CDATA[-noinput]]></c>.</p>
</item>
<tag><c><![CDATA[-man Module]]></c></tag>
<item>
<p>Displays the manual page for the Erlang module <c><![CDATA[Module]]></c>.
Only supported on Unix.</p>
</item>
<tag><c><![CDATA[-mode interactive | embedded]]></c></tag>
<item>
<p>Indicates if the system should load code dynamically
(<c><![CDATA[interactive]]></c>), or if all code should be loaded
during system initialization (<c><![CDATA[embedded]]></c>), see
<seealso marker="kernel:code">code(3)</seealso>. Defaults to
<c><![CDATA[interactive]]></c>.</p>
</item>
<tag><c><![CDATA[-name Name]]></c></tag>
<item>
<p>Makes the Erlang runtime system into a distributed node.
This flag invokes all network servers necessary for a node to
become distributed. See
<seealso marker="kernel:net_kernel">net_kernel(3)</seealso>.
It is also ensured that <c><![CDATA[epmd]]></c> runs on the current host
before Erlang is started. See
<seealso marker="epmd">epmd(1)</seealso>.</p>
<p>The name of the node will be <c><![CDATA[Name@Host]]></c>, where
<c><![CDATA[Host]]></c> is the fully qualified host name of the current
host. For short names, use the <c><![CDATA[-sname]]></c> flag instead.</p>
</item>
<tag><c><![CDATA[-noinput]]></c></tag>
<item>
<p>Ensures that the Erlang runtime system never tries to read
any input. Implies <c><![CDATA[-noshell]]></c>.</p>
</item>
<tag><c><![CDATA[-noshell]]></c></tag>
<item>
<p>Starts an Erlang runtime system with no shell. This flag
makes it possible to have the Erlang runtime system as a
component in a series of UNIX pipes.</p>
</item>
<tag><c><![CDATA[-nostick]]></c></tag>
<item>
<p>Disables the sticky directory facility of the Erlang code
server, see
<seealso marker="kernel:code">code(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-oldshell]]></c></tag>
<item>
<p>Invokes the old Erlang shell from Erlang 3.3. The old shell
can still be used.</p>
</item>
<tag><c><![CDATA[-pa Dir1 Dir2 ...]]></c></tag>
<item>
<p>Adds the specified directories to the beginning of the code
path, similar to <c><![CDATA[code:add_pathsa/1]]></c>. See
<seealso marker="kernel:code">code(3)</seealso>.
As an alternative to <c>-pa</c>, if several directories are
to be prepended to the code and the directories have a
common parent directory, that parent directory could be
specified in the <c>ERL_LIBS</c> environment variable.
See <seealso marker="kernel:code">code(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-pz Dir1 Dir2 ...]]></c></tag>
<item>
<p>Adds the specified directories to the end of the code path,
similar to <c><![CDATA[code:add_pathsz/1]]></c>. See
<seealso marker="kernel:code">code(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-remsh Node]]></c></tag>
<item>
<p>Starts Erlang with a remote shell connected to <c><![CDATA[Node]]></c>.</p>
</item>
<tag><c><![CDATA[-rsh Program]]></c></tag>
<item>
<p>Specifies an alternative to <c><![CDATA[rsh]]></c> for starting a slave
node on a remote host. See
<seealso marker="stdlib:slave">slave(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-run Mod [Func [Arg1, Arg2, ...]]]]></c>(init flag)</tag>
<item>
<p>Makes <c><![CDATA[init]]></c> call the specified function. <c><![CDATA[Func]]></c>
defaults to <c><![CDATA[start]]></c>. If no arguments are provided,
the function is assumed to be of arity 0. Otherwise it is
assumed to be of arity 1, taking the list
<c><![CDATA[[Arg1,Arg2,...]]]></c> as argument. All arguments are passed
as strings. See
<seealso marker="init">init(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-s Mod [Func [Arg1, Arg2, ...]]]]></c>(init flag)</tag>
<item>
<p>Makes <c><![CDATA[init]]></c> call the specified function. <c><![CDATA[Func]]></c>
defaults to <c><![CDATA[start]]></c>. If no arguments are provided,
the function is assumed to be of arity 0. Otherwise it is
assumed to be of arity 1, taking the list
<c><![CDATA[[Arg1,Arg2,...]]]></c> as argument. All arguments are passed
as atoms. See
<seealso marker="init">init(3)</seealso>.</p>
</item>
<tag><c><![CDATA[-setcookie Cookie]]></c></tag>
<item>
<p>Sets the magic cookie of the node to <c><![CDATA[Cookie]]></c>, see
<seealso marker="erlang#set_cookie/2">erlang:set_cookie/2</seealso>.</p>
</item>
<tag><c><![CDATA[-shutdown_time Time]]></c></tag>
<item>
<p>Specifies how long time (in milliseconds) the <c><![CDATA[init]]></c>
process is allowed to spend shutting down the system. If
<c><![CDATA[Time]]></c> ms have elapsed, all processes still existing are
killed. Defaults to <c><![CDATA[infinity]]></c>.</p>
</item>
<tag><c><![CDATA[-sname Name]]></c></tag>
<item>
<p>Makes the Erlang runtime system into a distributed node,
similar to <c><![CDATA[-name]]></c>, but the host name portion of the node
name <c><![CDATA[Name@Host]]></c> will be the short name, not fully
qualified.</p>
<p>This is sometimes the only way to run distributed Erlang if
the DNS (Domain Name System) is not running. There can be no
communication between nodes running with the <c><![CDATA[-sname]]></c>
flag and those running with the <c><![CDATA[-name]]></c> flag, as node
names must be unique in distributed Erlang systems.</p>
</item>
<tag><marker id="smp"><c><![CDATA[-smp [enable|auto|disable]]]></c></marker></tag>
<item>
<p><c>-smp enable</c> and <c>-smp</c> starts the Erlang runtime
system with SMP support enabled. This may fail if no runtime
system with SMP support is available. <c>-smp auto</c> starts
the Erlang runtime system with SMP support enabled if it is
available and more than one logical processor are detected.
<c>-smp disable</c> starts a runtime system without SMP support.</p>
<p><em>NOTE</em>: The runtime system with SMP support will not
be available on all supported platforms. See also the
<seealso marker="#+S">+S</seealso> flag.</p>
</item>
<tag><c><![CDATA[-version]]></c>(emulator flag)</tag>
<item>
<p>Makes the emulator print out its version number. The same
as <c><![CDATA[erl +V]]></c>.</p>
</item>
</taglist>
</section>
<section>
<marker id="emu_flags"></marker>
<title>Emulator Flags</title>
<p><c><![CDATA[erl]]></c> invokes the code for the Erlang emulator (virtual
machine), which supports the following flags:</p>
<taglist>
<tag><marker id="async_thread_stack_size"><c><![CDATA[+a size]]></c></marker></tag>
<item>
<p>Suggested stack size, in kilowords, for threads in the
async-thread pool. Valid range is 16-8192 kilowords. The
default suggested stack size is 16 kilowords, i.e, 64
kilobyte on 32-bit architectures. This small default size
has been chosen since the amount of async-threads might
be quite large. The default size is enough for drivers
delivered with Erlang/OTP, but might not be sufficiently
large for other dynamically linked in drivers that use the
<seealso marker="erl_driver#driver_async">driver_async()</seealso>
functionality. Note that the value passed is only a
suggestion, and it might even be ignored on some
platforms.</p>
</item>
<tag><marker id="async_thread_pool_size"><c><![CDATA[+A size]]></c></marker></tag>
<item>
<p>Sets the number of threads in async thread pool, valid range
is 0-1024. Default is 0.</p>
</item>
<tag><c><![CDATA[+B [c | d | i]]]></c></tag>
<item>
<p>The <c><![CDATA[c]]></c> option makes <c><![CDATA[Ctrl-C]]></c> interrupt the current
shell instead of invoking the emulator break handler.
The <c><![CDATA[d]]></c> option (same as specifying <c><![CDATA[+B]]></c> without an
extra option) disables the break handler. The <c><![CDATA[i]]></c> option
makes the emulator ignore any break signal.</p>
<p>If the <c><![CDATA[c]]></c> option is used with <c><![CDATA[oldshell]]></c> on Unix,
<c><![CDATA[Ctrl-C]]></c> will restart the shell process rather than
interrupt it.</p>
<p>Note that on Windows, this flag is only applicable for
<c><![CDATA[werl]]></c>, not <c><![CDATA[erl]]></c> (<c><![CDATA[oldshell]]></c>). Note also that
<c><![CDATA[Ctrl-Break]]></c> is used instead of <c><![CDATA[Ctrl-C]]></c> on Windows.</p>
</item>
<tag><c><![CDATA[+c]]></c></tag>
<item>
<p>Disable compensation for sudden changes of system time.</p>
<p>Normally, <c><![CDATA[erlang:now/0]]></c> will not immediately reflect
sudden changes in the system time, in order to keep timers
(including <c><![CDATA[receive-after]]></c>) working. Instead, the time
maintained by <c><![CDATA[erlang:now/0]]></c> is slowly adjusted towards
the new system time. (Slowly means in one percent adjustments;
if the time is off by one minute, the time will be adjusted
in 100 minutes.)</p>
<p>When the <c><![CDATA[+c]]></c> option is given, this slow adjustment
will not take place. Instead <c><![CDATA[erlang:now/0]]></c> will always
reflect the current system time. Note that timers are based
on <c><![CDATA[erlang:now/0]]></c>. If the system time jumps, timers
then time out at the wrong time.</p>
</item>
<tag><c><![CDATA[+d]]></c></tag>
<item>
<p>If the emulator detects an internal error (or runs out of memory),
it will by default generate both a crash dump and a core dump.
The core dump will, however, not be very useful since the content
of process heaps is destroyed by the crash dump generation.</p>
<p>The <c>+d</c> option instructs the emulator to only produce a
core dump and no crash dump if an internal error is detected.</p>
<p>Calling <c>erlang:halt/1</c> with a string argument will still
produce a crash dump.</p>
</item>
<tag><c><![CDATA[+e Number]]></c></tag>
<item>
<p>Set max number of ETS tables.</p>
</item>
<tag><c><![CDATA[+ec]]></c></tag>
<item>
<p>Force the <c>compressed</c> option on all ETS tables.
Only intended for test and evaluation.</p>
</item>
<tag><marker id="file_name_encoding"></marker><c><![CDATA[+fnl]]></c></tag>
<item>
<p>The VM works with file names as if they are encoded using the ISO-latin-1 encoding, disallowing Unicode characters with codepoints beyond 255. This is default on operating systems that have transparent file naming, i.e. all Unixes except MacOSX.</p>
</item>
<tag><c><![CDATA[+fnu]]></c></tag>
<item>
<p>The VM works with file names as if they are encoded using UTF-8 (or some other system specific Unicode encoding). This is the default on operating systems that enforce Unicode encoding, i.e. Windows and MacOSX.</p>
<p>By enabling Unicode file name translation on systems where this is not default, you open up to the possibility that some file names can not be interpreted by the VM and therefore will be returned to the program as raw binaries. The option is therefore considered experimental.</p>
</item>
<tag><c><![CDATA[+fna]]></c></tag>
<item>
<p>Selection between <c>+fnl</c> and <c>+fnu</c> is done based on the current locale settings in the OS, meaning that if you have set your terminal for UTF-8 encoding, the filesystem is expected to use the same encoding for filenames (use with care).</p>
</item>
<tag><c><![CDATA[+hms Size]]></c></tag>
<item>
<p>Sets the default heap size of processes to the size
<c><![CDATA[Size]]></c>.</p>
</item>
<tag><c><![CDATA[+hmbs Size]]></c></tag>
<item>
<p>Sets the default binary virtual heap size of processes to the size
<c><![CDATA[Size]]></c>.</p>
</item>
<tag><c><![CDATA[+K true | false]]></c></tag>
<item>
<p>Enables or disables the kernel poll functionality if
the emulator supports it. Default is <c><![CDATA[false]]></c> (disabled).
If the emulator does not support kernel poll, and
the <c><![CDATA[+K]]></c> flag is passed to the emulator, a warning is
issued at startup.</p>
</item>
<tag><c><![CDATA[+l]]></c></tag>
<item>
<p>Enables auto load tracing, displaying info while loading
code.</p>
</item>
<tag><c><![CDATA[+L]]></c></tag>
<item>
<p>Don't load information about source filenames and line numbers.
This will save some memory, but exceptions will not contain
information about the filenames and line numbers.
</p>
</item>
<tag><marker id="erts_alloc"><c><![CDATA[+MFlag Value]]></c></marker></tag>
<item>
<p>Memory allocator specific flags, see
<seealso marker="erts_alloc">erts_alloc(3)</seealso> for
further information.</p>
</item>
<tag><marker id="max_processes"><c><![CDATA[+P Number]]></c></marker></tag>
<item>
<p>Sets the maximum number of concurrent processes for this
system. <c><![CDATA[Number]]></c> must be in the range 16..134217727.
Default is 32768.</p>
</item>
<tag><marker id="compat_rel"><c><![CDATA[+R ReleaseNumber]]></c></marker></tag>
<item>
<p>Sets the compatibility mode.</p>
<p>The distribution mechanism is not backwards compatible by
default. This flags sets the emulator in compatibility mode
with an earlier Erlang/OTP release <c><![CDATA[ReleaseNumber]]></c>.
The release number must be in the range
<c><![CDATA[7..<current release>]]></c>. This limits the emulator,
making it possible for it to communicate with Erlang nodes
(as well as C- and Java nodes) running that earlier release.</p>
<p>For example, an R10 node is not automatically compatible
with an R9 node, but R10 nodes started with the <c><![CDATA[+R 9]]></c>
flag can co-exist with R9 nodes in the same distributed
Erlang system, they are R9-compatible.</p>
<p>Note: Make sure all nodes (Erlang-, C-, and Java nodes) of
a distributed Erlang system is of the same Erlang/OTP release,
or from two different Erlang/OTP releases X and Y, where
<em>all</em> Y nodes have compatibility mode X.</p>
<p>For example: A distributed Erlang system can consist of
R10 nodes, or of R9 nodes and R9-compatible R10 nodes, but
not of R9 nodes, R9-compatible R10 nodes and "regular" R10
nodes, as R9 and "regular" R10 nodes are not compatible.</p>
</item>
<tag><c><![CDATA[+r]]></c></tag>
<item>
<p>Force ets memory block to be moved on realloc.</p>
</item>
<tag><marker id="+rg"><c><![CDATA[+rg ReaderGroupsLimit]]></c></marker></tag>
<item>
<p>Limits the amount of reader groups used by read/write locks
optimized for read operations in the Erlang runtime system. By
default the reader groups limit equals 8.</p>
<p>When the amount of schedulers is less than or equal to the reader
groups limit, each scheduler has its own reader group. When the
amount of schedulers is larger than the reader groups limit,
schedulers share reader groups. Shared reader groups degrades
read lock and read unlock performance while a large amount of
reader groups degrades write lock performance, so the limit is a
tradeoff between performance for read operations and performance
for write operations. Each reader group currently consumes 64 byte
in each read/write lock. Also note that a runtime system using
shared reader groups benefits from <seealso marker="#+sbt">binding
schedulers to logical processors</seealso>, since the reader groups
are distributed better between schedulers.</p>
</item>
<tag><marker id="+S"><c><![CDATA[+S Schedulers:SchedulerOnline]]></c></marker></tag>
<item>
<p>Sets the amount of scheduler threads to create and scheduler
threads to set online when SMP support has been enabled.
Valid range for both values are 1-1024. If the
Erlang runtime system is able to determine the amount
of logical processors configured and logical processors available,
<c>Schedulers</c> will default to logical processors configured,
and <c>SchedulersOnline</c> will default to logical processors
available; otherwise, the default values will be 1. <c>Schedulers</c>
may be omitted if <c>:SchedulerOnline</c> is not and vice versa. The
amount of schedulers online can be changed at run time via
<seealso marker="erlang#system_flag_schedulers_online">erlang:system_flag(schedulers_online, SchedulersOnline)</seealso>.
</p>
<p>This flag will be ignored if the emulator doesn't have
SMP support enabled (see the <seealso marker="#smp">-smp</seealso>
flag).</p>
</item>
<tag><c><![CDATA[+sFlag Value]]></c></tag>
<item>
<p>Scheduling specific flags.</p>
<taglist>
<tag><marker id="+sbt"><c>+sbt BindType</c></marker></tag>
<item>
<p>Set scheduler bind type.</p>
<p>Schedulers can also be bound using the
<seealso marker="#+stbt">+stbt</seealso> flag. The only difference
between these two flags is how the following errors are handled:</p>
<list>
<item>Binding of schedulers is not supported on the specific
platform.</item>
<item>No available CPU topology. That is the runtime system
was not able to automatically detected the CPU topology, and
no <seealso marker="#+sct">user defined CPU topology</seealso>
was set.</item>
</list>
<p>If any of these errors occur when <c>+sbt</c> has been passed,
the runtime system will print an error message, and refuse to
start. If any of these errors occur when <c>+stbt</c> has been
passed, the runtime system will silently ignore the error, and
start up using unbound schedulers.</p>
<p>Currently valid <c>BindType</c>s:
</p>
<taglist>
<tag><c>u</c></tag>
<item>
<p><c>unbound</c> - Schedulers will not be bound to logical
processors, i.e., the operating system decides where the
scheduler threads execute, and when to migrate them. This is
the default.</p>
</item>
<tag><c>ns</c></tag>
<item>
<p><c>no_spread</c> - Schedulers with close scheduler
identifiers will be bound as close as possible in hardware.</p>
</item>
<tag><c>ts</c></tag>
<item>
<p><c>thread_spread</c> - Thread refers to hardware threads
(e.g. Intel's hyper-threads). Schedulers with low scheduler
identifiers, will be bound to the first hardware thread of
each core, then schedulers with higher scheduler identifiers
will be bound to the second hardware thread of each core,
etc.</p>
</item>
<tag><c>ps</c></tag>
<item>
<p><c>processor_spread</c> - Schedulers will be spread like
<c>thread_spread</c>, but also over physical processor chips.</p>
</item>
<tag><c>s</c></tag>
<item>
<p><c>spread</c> - Schedulers will be spread as much as
possible.</p>
</item>
<tag><c>nnts</c></tag>
<item>
<p><c>no_node_thread_spread</c> - Like <c>thread_spread</c>,
but if multiple NUMA (Non-Uniform Memory Access) nodes exists,
schedulers will be spread over one NUMA node at a time,
i.e., all logical processors of one NUMA node will be bound
to schedulers in sequence.</p>
</item>
<tag><c>nnps</c></tag>
<item>
<p><c>no_node_processor_spread</c> - Like
<c>processor_spread</c>, but if multiple NUMA nodes exists,
schedulers will be spread over one NUMA node at a time, i.e.,
all logical processors of one NUMA node will be bound to
schedulers in sequence.</p>
</item>
<tag><c>tnnps</c></tag>
<item>
<p><c>thread_no_node_processor_spread</c> - A combination of
<c>thread_spread</c>, and <c>no_node_processor_spread</c>.
Schedulers will be spread over hardware threads across NUMA
nodes, but schedulers will only be spread over processors
internally in one NUMA node at a time.</p>
</item>
<tag><c>db</c></tag>
<item>
<p><c>default_bind</c> - Binds schedulers the default way.
Currently the default is <c>thread_no_node_processor_spread</c>
(which might change in the future).</p>
</item>
</taglist>
<p>Binding of schedulers is currently only supported on newer
Linux, Solaris, FreeBSD, and Windows systems.</p>
<p>If no CPU topology is available when the <c>+sbt</c> flag
is processed and <c>BindType</c> is any other type than
<c>u</c>, the runtime system will fail to start. CPU
topology can be defined using the
<seealso marker="#+sct">+sct</seealso> flag. Note
that the <c>+sct</c> flag may have to be passed before the
<c>+sbt</c> flag on the command line (in case no CPU topology
has been automatically detected).</p>
<p>The runtime system will by default <em>not</em> bind schedulers
to logical processors.
</p>
<p><em>NOTE:</em> If the Erlang runtime system is the only operating system
process that binds threads to logical processors, this
improves the performance of the runtime system. However,
if other operating system processes (as for example
another Erlang runtime system) also bind threads to
logical processors, there might be a performance penalty
instead. In some cases this performance penalty might be
severe. If this is the case, you are advised to not
bind the schedulers.</p>
<p>How schedulers are bound matters. For example, in
situations when there are fewer running processes than
schedulers online, the runtime system tries to migrate
processes to schedulers with low scheduler identifiers.
The more the schedulers are spread over the hardware,
the more resources will be available to the runtime
system in such situations.
</p>
<p>
<em>NOTE:</em> If a scheduler fails to bind, this
will often be silently ignored. This since it isn't always
possible to verify valid logical processor identifiers. If
an error is reported, it will be reported to the
<c>error_logger</c>. If you want to verify that the
schedulers actually have bound as requested, call
<seealso marker="erlang#system_info_scheduler_bindings">erlang:system_info(scheduler_bindings)</seealso>.
</p>
</item>
<tag><marker id="+sbwt"><c>+sbwt none|very_short|short|medium|long|very_long</c></marker></tag>
<item>
<p>Set scheduler busy wait threshold. Default is <c>medium</c>.
The threshold determines how long schedulers should busy
wait when running out of work before going to sleep.
</p>
<p><em>NOTE:</em> This flag may be removed or changed at any time
without prior notice.
</p>
</item>
<tag><marker id="+scl"><c>+scl true|false</c></marker></tag>
<item>
<p>Enable or disable scheduler compaction of load. By default
scheduler compaction of load is enabled. When enabled, load
balancing will strive for a load distribution which causes
as many scheduler threads as possible to be fully loaded (i.e.,
not run out of work). This is accomplished by migrating load
(e.g. runnable processes) into a smaller set of schedulers
when schedulers frequently run out of work. When disabled,
the frequency with which schedulers run out of work will
not be taken into account by the load balancing logic.
</p>
</item>
<tag><marker id="+sct"><c>+sct CpuTopology</c></marker></tag>
<item>
<list type="bulleted">
<item><c><![CDATA[<Id> = integer(); when 0 =< <Id> =< 65535]]></c></item>
<item><c><![CDATA[<IdRange> = <Id>-<Id>]]></c></item>
<item><c><![CDATA[<IdOrIdRange> = <Id> | <IdRange>]]></c></item>
<item><c><![CDATA[<IdList> = <IdOrIdRange>,<IdOrIdRange> | <IdOrIdRange>]]></c></item>
<item><c><![CDATA[<LogicalIds> = L<IdList>]]></c></item>
<item><c><![CDATA[<ThreadIds> = T<IdList> | t<IdList>]]></c></item>
<item><c><![CDATA[<CoreIds> = C<IdList> | c<IdList>]]></c></item>
<item><c><![CDATA[<ProcessorIds> = P<IdList> | p<IdList>]]></c></item>
<item><c><![CDATA[<NodeIds> = N<IdList> | n<IdList>]]></c></item>
<item><c><![CDATA[<IdDefs> = <LogicalIds><ThreadIds><CoreIds><ProcessorIds><NodeIds> | <LogicalIds><ThreadIds><CoreIds><NodeIds><ProcessorIds>]]></c></item>
<item><c><![CDATA[CpuTopology = <IdDefs>:<IdDefs> | <IdDefs>]]></c></item>
</list>
<p>Set a user defined CPU topology. The user defined
CPU topology will override any automatically detected
CPU topology. The CPU topology is used when
<seealso marker="#+sbt">binding schedulers to logical
processors</seealso>.
</p>
<p>Upper-case letters signify real identifiers and lower-case
letters signify fake identifiers only used for description
of the topology. Identifiers passed as real identifiers may
be used by the runtime system when trying to access specific
hardware and if they are not correct the behavior is
undefined. Faked logical CPU identifiers are not accepted
since there is no point in defining the CPU topology without
real logical CPU identifiers. Thread, core, processor, and
node identifiers may be left out. If left out, thread id
defaults to <c>t0</c>, core id defaults to <c>c0</c>,
processor id defaults to <c>p0</c>, and node id will
be left undefined. Either each logical processor must
belong to one and only one NUMA node, or no logical
processors must belong to any NUMA nodes.
</p>
<p>Both increasing and decreasing <c><![CDATA[<IdRange>]]></c>s
are allowed.</p>
<p>NUMA node identifiers are system wide. That is, each NUMA
node on the system have to have a unique identifier. Processor
identifiers are also system wide. Core identifiers are
processor wide. Thread identifiers are core wide.</p>
<p>The order of the identifier types imply the hierarchy of the
CPU topology. Valid orders are either
<c><![CDATA[<LogicalIds><ThreadIds><CoreIds><ProcessorIds><NodeIds>]]></c>,
or
<c><![CDATA[<LogicalIds><ThreadIds><CoreIds><NodeIds><ProcessorIds>]]></c>.
That is, thread is part of a core which is part of a processor
which is part of a NUMA node, or thread is part of a core which
is part of a NUMA node which is part of a processor. A cpu
topology can consist of both processor external, and processor
internal NUMA nodes as long as each logical processor belongs
to one and only one NUMA node. If <c><![CDATA[<ProcessorIds>]]></c>
is left out, its default position will be before
<c><![CDATA[<NodeIds>]]></c>. That is, the default is
processor external NUMA nodes.
</p>
<p>If a list of identifiers is used in an
<c><![CDATA[<IdDefs>]]></c>:</p>
<list type="bulleted">
<item><c><![CDATA[<LogicalIds>]]></c> have to be a list
of identifiers.</item>
<item>At least one other identifier type apart from
<c><![CDATA[<LogicalIds>]]></c> also have to have a
list of identifiers.</item>
<item>All lists of identifiers have to produce the
same amount of identifiers.</item>
</list>
<p>A simple example. A single quad core processor may be
described this way:</p>
<pre>
% <input>erl +sct L0-3c0-3</input>
1> <input>erlang:system_info(cpu_topology).</input>
[{processor,[{core,{logical,0}},
{core,{logical,1}},
{core,{logical,2}},
{core,{logical,3}}]}]
</pre>
<p>A little more complicated example. Two quad core
processors. Each processor in its own NUMA node.
The ordering of logical processors is a little weird.
This in order to give a better example of identifier
lists:</p>
<pre>
% <input>erl +sct L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1</input>
1> <input>erlang:system_info(cpu_topology).</input>
[{node,[{processor,[{core,{logical,0}},
{core,{logical,1}},
{core,{logical,3}},
{core,{logical,2}}]}]},
{node,[{processor,[{core,{logical,7}},
{core,{logical,4}},
{core,{logical,6}},
{core,{logical,5}}]}]}]
</pre>
<p>As long as real identifiers are correct it is okay
to pass a CPU topology that is not a correct
description of the CPU topology. When used with
care this can actually be very useful. This in
order to trick the emulator to bind its schedulers
as you want. For example, if you want to run multiple
Erlang runtime systems on the same machine, you
want to reduce the amount of schedulers used and
manipulate the CPU topology so that they bind to
different logical CPUs. An example, with two Erlang
runtime systems on a quad core machine:</p>
<pre>
% <input>erl +sct L0-3c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname one</input>
% <input>erl +sct L3-0c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname two</input>
</pre>
<p>In this example each runtime system have two
schedulers each online, and all schedulers online
will run on different cores. If we change to one
scheduler online on one runtime system, and three
schedulers online on the other, all schedulers
online will still run on different cores.</p>
<p>Note that a faked CPU topology that does not reflect
how the real CPU topology looks like is likely to
decrease the performance of the runtime system.</p>
<p>For more information, see
<seealso marker="erlang#system_info_cpu_topology">erlang:system_info(cpu_topology)</seealso>.</p>
</item>
<tag><marker id="+stbt"><c>+stbt BindType</c></marker></tag>
<item>
<p>Try to set scheduler bind type. The same as the
<seealso marker="#+sbt">+sbt</seealso> flag with the exception of
how some errors are handled. For more information, see the
documentation of the <seealso marker="#+sbt">+sbt</seealso> flag.
</p>
</item>
<tag><marker id="+sws"><c>+sws default|legacy|proposal</c></marker></tag>
<item>
<p>Set scheduler wakeup strategy. Default is <c>legacy</c> (has been
used since OTP-R13B). The <c>proposal</c> strategy is the currently
proposed strategy for OTP-R16. Note that the <c>proposal</c> strategy
might change during OTP-R15.
</p>
<p><em>NOTE:</em> This flag may be removed or changed at any time
without prior notice.
</p>
</item>
<tag><marker id="+swt"><c>+swt very_low|low|medium|high|very_high</c></marker></tag>
<item>
<p>Set scheduler wakeup threshold. Default is <c>medium</c>.
The threshold determines when to wake up sleeping schedulers
when more work than can be handled by currently awake schedulers
exist. A low threshold will cause earlier wakeups, and a high
threshold will cause later wakeups. Early wakeups will
distribute work over multiple schedulers faster, but work will
more easily bounce between schedulers.
</p>
<p><em>NOTE:</em> This flag may be removed or changed at any time
without prior notice.
</p>
</item>
<tag><marker id="sched_thread_stack_size"><c><![CDATA[+sss size]]></c></marker></tag>
<item>
<p>Suggested stack size, in kilowords, for scheduler threads.
Valid range is 4-8192 kilowords. The default stack size
is OS dependent.</p>
</item>
</taglist>
</item>
<tag><marker id="+t"><c><![CDATA[+t size]]></c></marker></tag>
<item>
<p>Set the maximum number of atoms the VM can handle. Default is 1048576.</p>
</item>
<tag><marker id="+T"><c><![CDATA[+T Level]]></c></marker></tag>
<item>
<p>Enables modified timing and sets the modified timing level.
Currently valid range is 0-9. The timing of the runtime system
will change. A high level usually means a greater change than
a low level. Changing the timing can be very useful for finding
timing related bugs.</p>
<p>Currently, modified timing affects the following:</p>
<taglist>
<tag>Process spawning</tag>
<item>
<p>A process calling <c><![CDATA[spawn]]></c>, <c><![CDATA[spawn_link]]></c>,
<c><![CDATA[spawn_monitor]]></c>, or <c><![CDATA[spawn_opt]]></c> will be scheduled
out immediately after completing the call. When higher modified
timing levels are used, the caller will also sleep for a while
after being scheduled out.</p>
</item>
<tag>Context reductions</tag>
<item>The amount of reductions a process is a allowed to
use before being scheduled out is increased or reduced.</item>
<tag>Input reductions</tag>
<item>The amount of reductions performed before checking I/O
is increased or reduced.</item>
</taglist>
<p><em>NOTE:</em> Performance will suffer when modified timing
is enabled. This flag is <em>only</em> intended for testing and
debugging. Also note that <c><![CDATA[return_to]]></c> and <c><![CDATA[return_from]]></c>
trace messages will be lost when tracing on the spawn BIFs. This
flag may be removed or changed at any time without prior notice.</p>
</item>
<tag><c><![CDATA[+V]]></c></tag>
<item>
<p>Makes the emulator print out its version number.</p>
</item>
<tag><c><![CDATA[+v]]></c></tag>
<item>
<p>Verbose.</p>
</item>
<tag><c><![CDATA[+W w | i]]></c></tag>
<item>
<p>Sets the mapping of warning messages for <c><![CDATA[error_logger]]></c>.
Messages sent to the error logger using one of the warning
routines can be mapped either to errors (default), warnings
(<c><![CDATA[+W w]]></c>), or info reports (<c><![CDATA[+W i]]></c>). The current
mapping can be retrieved using
<c><![CDATA[error_logger:warning_map/0]]></c>. See
<seealso marker="kernel:error_logger#warning_map/0">error_logger(3)</seealso>
for further information.</p>
</item>
<tag><c><![CDATA[+zFlag Value]]></c></tag>
<item>
<p>Miscellaneous flags.</p>
<taglist>
<tag><marker id="+zdbbl"><c>+zdbbl size</c></marker></tag>
<item>
<p>Set the distribution buffer busy limit
(<seealso marker="erlang#system_info_dist_buf_busy_limit">dist_buf_busy_limit</seealso>)
in kilobytes. Valid range is 1-2097151. Default is 1024.</p>
<p>A larger buffer limit will allow processes to buffer
more outgoing messages over the distribution. When the
buffer limit has been reached, sending processes will be
suspended until the buffer size has shrunk. The buffer
limit is per distribution channel. A higher limit will
give lower latency and higher throughput at the expense
of higher memory usage.</p>
</item>
</taglist>
</item>
</taglist>
</section>
<section>
<marker id="environment_variables"></marker>
<title>Environment variables</title>
<taglist>
<tag><c><![CDATA[ERL_CRASH_DUMP]]></c></tag>
<item>
<p>If the emulator needs to write a crash dump, the value of this
variable will be the file name of the crash dump file.
If the variable is not set, the name of the crash dump file will
be <c><![CDATA[erl_crash.dump]]></c> in the current directory.</p>
</item>
<tag><c><![CDATA[ERL_CRASH_DUMP_NICE]]></c></tag>
<item>
<p><em>Unix systems</em>: If the emulator needs to write a crash dump,
it will use the value of this variable to set the nice value
for the process, thus lowering its priority. The allowable range is
1 through 39 (higher values will be replaced with 39). The highest
value, 39, will give the process the lowest priority.</p>
</item>
<tag><c><![CDATA[ERL_CRASH_DUMP_SECONDS]]></c></tag>
<item>
<p><em>Unix systems</em>: This variable gives the number of seconds that
the emulator will be allowed to spend writing a crash dump. When
the given number of seconds have elapsed, the emulator will be
terminated by a SIGALRM signal.</p>
<p> If the environment variable is <em>not</em> set or it is set to zero seconds, <c><![CDATA[ERL_CRASH_DUMP_SECONDS=0]]></c>,
the runtime system will not even attempt to write the crash dump file. It will just terminate.
</p>
<p> If the environment variable is set to negative valie, e.g. <c><![CDATA[ERL_CRASH_DUMP_SECONDS=-1]]></c>,
the runtime system will wait indefinitely for the crash dump file to be written.
</p>
<p> This environment variable is used in conjuction with
<seealso marker="kernel:heart"><c>heart</c></seealso> if <c>heart</c> is running:
</p>
<taglist>
<tag><c><![CDATA[ERL_CRASH_DUMP_SECONDS=0]]></c></tag>
<item><p>
Suppresses the writing a crash dump file entirely,
thus rebooting the runtime system immediately.
This is the same as not setting the environment variable.
</p>
</item>
<tag><c><![CDATA[ERL_CRASH_DUMP_SECONDS=-1]]></c></tag>
<item><p>Setting the environment variable to a negative value will cause the
termination of the runtime system to wait until the crash dump file
has been completly written.
</p>
</item>
<tag><c><![CDATA[ERL_CRASH_DUMP_SECONDS=S]]></c></tag>
<item><p>
Will wait for <c>S</c> seconds to complete the crash dump file and
then terminate the runtime system.
</p>
</item>
</taglist>
</item>
<tag><c><![CDATA[ERL_AFLAGS]]></c></tag>
<item>
<p>The content of this environment variable will be added to the
beginning of the command line for <c><![CDATA[erl]]></c>.</p>
<p>The <c><![CDATA[-extra]]></c> flag is treated specially. Its scope ends
at the end of the environment variable content. Arguments
following an <c><![CDATA[-extra]]></c> flag are moved on the command line into
the <c><![CDATA[-extra]]></c> section, i.e. the end of the command line
following after an <c><![CDATA[-extra]]></c> flag.</p>
</item>
<tag><c><![CDATA[ERL_ZFLAGS]]></c> and <c><![CDATA[ERL_FLAGS]]></c></tag>
<item>
<p>The content of these environment variables will be added to the
end of the command line for <c><![CDATA[erl]]></c>.</p>
<p>The <c><![CDATA[-extra]]></c> flag is treated specially. Its scope ends
at the end of the environment variable content. Arguments
following an <c><![CDATA[-extra]]></c> flag are moved on the command line into
the <c><![CDATA[-extra]]></c> section, i.e. the end of the command line
following after an <c><![CDATA[-extra]]></c> flag.</p>
</item>
<tag><c><![CDATA[ERL_LIBS]]></c></tag>
<item>
<p>This environment variable contains a list of additional library
directories that the code server will search for applications and
add to the code path.
See <seealso marker="kernel:code">code(3)</seealso>.</p>
</item>
<tag><c><![CDATA[ERL_EPMD_ADDRESS]]></c></tag>
<item>
<p>This environment variable may be set to a comma-separated
list of IP addresses, in which case the
<seealso marker="epmd">epmd</seealso> daemon
will listen only on the specified address(es) and on the
loopback address (which is implicitly added to the list if it
has not been specified).</p>
</item>
<tag><c><![CDATA[ERL_EPMD_PORT]]></c></tag>
<item>
<p>This environment variable can contain the port number to use when
communicating with <seealso marker="epmd">epmd</seealso>. The default
port will work fine in most cases. A different port can be specified
to allow nodes of independent clusters to co-exist on the same host.
All nodes in a cluster must use the same epmd port number.</p>
</item>
</taglist>
</section>
<section>
<marker id="configuration"></marker>
<title>Configuration</title>
<p>The standard Erlang/OTP system can be re-configured to change the default
behavior on start-up.</p>
<taglist>
<tag>The .erlang Start-up File</tag>
<item>
<p>When Erlang/OTP is started, the system searches for a file named .erlang
in the directory where Erlang/OTP is started. If not found, the user's home
directory is searched for an .erlang file.</p>
<p>If an .erlang file is found, it is assumed to contain valid Erlang expressions.
These expressions are evaluated as if they were input to the shell.</p>
<p>A typical .erlang file contains a set of search paths, for example:</p>
<code type="none"><![CDATA[
io:format("executing user profile in HOME/.erlang\n",[]).
code:add_path("/home/calvin/test/ebin").
code:add_path("/home/hobbes/bigappl-1.2/ebin").
io:format(".erlang rc finished\n",[]).
]]></code>
</item>
<tag>user_default and shell_default</tag>
<item>
<p>Functions in the shell which are not prefixed by a module name are assumed
to be functional objects (Funs), built-in functions (BIFs), or belong to the
module user_default or shell_default.</p>
<p>To include private shell commands, define them in a module user_default and
add the following argument as the first line in the .erlang file.</p>
<code type="none"><![CDATA[
code:load_abs("..../user_default").
]]></code>
</item>
<tag>erl</tag>
<item>
<p>If the contents of .erlang are changed and a private version of
user_default is defined, it is possible to customize the Erlang/OTP environment.
More powerful changes can be made by supplying command line arguments in the
start-up script erl. Refer to erl(1) and <seealso marker="init">init(3)</seealso>
for further information.</p>
</item>
</taglist>
</section>
<section>
<title>SEE ALSO</title>
<p><seealso marker="init">init(3)</seealso>,
<seealso marker="erl_prim_loader">erl_prim_loader(3)</seealso>,
<seealso marker="kernel:erl_boot_server">erl_boot_server(3)</seealso>,
<seealso marker="kernel:code">code(3)</seealso>,
<seealso marker="kernel:application">application(3)</seealso>,
<seealso marker="kernel:heart">heart(3)</seealso>,
<seealso marker="kernel:net_kernel">net_kernel(3)</seealso>,
<seealso marker="kernel:auth">auth(3)</seealso>,
<seealso marker="tools:make">make(3)</seealso>,
<seealso marker="epmd">epmd(1)</seealso>,
<seealso marker="erts_alloc">erts_alloc(3)</seealso></p>
</section>
</comref>