The
Windows users probably wants to use the
Starts an Erlang runtime system.
The arguments can be divided into emulator flags, flags and plain arguments:
Any argument starting with the character
As indicated by the name, emulator flags controls the behavior of the emulator.
Any argument starting with the character
The
It can be noted that there are a small number of "-" flags which now actually are emulator flags, see the description below.
Plain arguments are not interpreted in any way. They are
also stored by the
Example:
% erl +W w -sname arnie +R 9 -s my_init -extra +bertie (arnie@host)1> init:get_argument(sname). {ok,[["arnie"]]} (arnie@host)2> init:get_plain_arguments(). ["+bertie"]
Here
% erl -myflag 1 1> init:get_argument(myflag). {ok,[["1"]]} 2> init:get_plain_arguments(). []
Here the user flag
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
Everything following
Sets the application configuration parameter
Command line arguments are read from the file
The file
The
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.
Specifies the name of the boot file,
Defaults to
If the boot script contains a path variable
Enables the code path cache of the code server, see
Compiles the specified modules and then terminates (with
non-zero exit code if the compilation of some file did not
succeed). Implies
Specifies the name of a configuration file,
If this flag is present,
Obsolete flag without any effect and common misspelling for
Starts the Erlang runtime system detached from the system console. Useful for running daemons and backgrounds processes.
Useful for debugging. Prints out the actual arguments sent to the emulator.
Sets the host OS environment variable
% erl -env DISPLAY gin:0
In this example, an Erlang runtime system is started with
the
Makes
Everything following
Starts heart beat monitoring of the Erlang runtime system.
See
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
neither of the connected nodes, i.e. neither of the connected
nodes are part of the result from
Specifies the IP addresses for the hosts on which Erlang
boot servers are running, see
The IP addresses must be given in the standard form (four
decimal numbers separated by periods, for example
Specifies the identity of the Erlang runtime system. If it is
run as a distributed node,
Makes
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
Specifies the method used by
Makes the Erlang runtime system invoke
Displays the manual page for the Erlang module
Indicates if the system should load code dynamically
(
Makes the Erlang runtime system into a distributed node.
This flag invokes all network servers necessary for a node to
become distributed. See
The name of the node will be
Ensures that the Erlang runtime system never tries to read
any input. Implies
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.
Disables the sticky directory facility of the Erlang code
server, see
Invokes the old Erlang shell from Erlang 3.3. The old shell can still be used.
Adds the specified directories to the beginning of the code
path, similar to
Adds the specified directories to the end of the code path,
similar to
Starts Erlang with a remote shell connected to
Specifies an alternative to
Makes
Makes
Sets the magic cookie of the node to
Specifies how long time (in milliseconds) the
Makes the Erlang runtime system into a distributed node,
similar to
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
NOTE: The runtime system with SMP support will not
be available on all supported platforms. See also the
Makes the emulator print out its version number. The same
as
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
Sets the number of threads in async thread pool, valid range is 0-1024. Default is 0.
The
If the
Note that on Windows, this flag is only applicable for
Disable compensation for sudden changes of system time.
Normally,
When the
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.
The
Calling
Sets the default heap size of processes to the size
Enables or disables the kernel poll functionality if
the emulator supports it. Default is
Enables auto load tracing, displaying info while loading code.
Memory allocator specific flags, see
Sets the maximum number of concurrent processes for this
system.
Sets the compatibility mode.
The distribution mechanism is not backwards compatible by
default. This flags sets the emulator in compatibility mode
with an earlier Erlang/OTP release
For example, an R10 node is not automatically compatible
with an R9 node, but R10 nodes started with the
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 all Y nodes have compatibility mode X.
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.
Force ets memory block to be moved on realloc.
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,
This flag will be ignored if the emulator doesn't have
SMP support enabled (see the
Scheduling specific flags.
Set scheduler bind type. Currently valid
Same as
Same as
Same as
Same as
Same as
Same as
Same as
Same as
Same as
Binding of schedulers are currently only supported on newer Linux and Solaris systems.
If no CPU topology is available when the
For more information, see
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
Both increasing and decreasing
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.
The order of the identifier types imply the hierarchy of the
CPU topology. Valid orders are either
If a list of identifiers is used in an
A simple example. A single quad core processor may be described this way:
% erl +sct L0-3c0-3 1> erlang:system_info(cpu_topology). [{processor,[{core,{logical,0}}, {core,{logical,1}}, {core,{logical,2}}, {core,{logical,3}}]}]
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:
% erl +sct L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1 1> erlang:system_info(cpu_topology). [{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}}]}]}]
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:
% erl +sct L0-3c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname one % erl +sct L3-0c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname two
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.
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.
For more information, see
Suggested stack size, in kilowords, for scheduler threads. Valid range is 4-8192 kilowords. The default stack size is OS dependent.
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.
Currently, modified timing affects the following:
A process calling
NOTE: Performance will suffer when modified timing
is enabled. This flag is only intended for testing and
debugging. Also note that
Makes the emulator print out its version number.
Verbose.
Sets the mapping of warning messages for
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
Unix systems: 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.
Unix systems: 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.
The content of this environment variable will be added to the
beginning of the command line for
The
The content of these environment variables will be added to the
end of the command line for
The
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
This environment variable can contain the port number to use when
communicating with