Redirect Erlang input and output streams on Solaris®
This describes the
run_erl program specific to Solaris/Linux. This program redirect the standard input and standard output streams so that all output can be logged. It also let the program
to_erl connect to the Erlang console making it possible to monitor and debug an embedded system remotely.
You can read more about the use in the
Embedded System User's Guide.
run_erl [-daemon] pipe_dir/ log_dir "exec command [command_arguments]"
run_erl program arguments are:
/tmp/on Unix or
/pipe/on OSE. It shall be suffixed by a
/(slash), i.e. not
run_erl.logthat log progress and warnings from the
run_erlprogram itself and there will be up to five log files at maximum 100KB each (both number of logs and sizes can be changed by environment variables, see below) with the content of the standard streams from and to the command. When the logs are full
run_erlwill delete and reuse the oldest log file.
commandis the to execute where everything written to stdin and stdout is logged to
While running, run_erl (as stated earlier) sends all output, uninterpreted, to a log file. The file is called
erlang.log.N, where N is a number. When the log is "full", default after 100KB, run_erl starts to log in file
erlang.log.(N+1), until N reaches a certain number (default 5), where after N starts at 1 again and the oldest files start getting overwritten. If no output comes from the erlang shell, but the erlang machine still seems to be alive, an "ALIVE" message is written to the log, it is a timestamp and is written, by default, after 15 minutes of inactivity. Also, if output from erlang is logged but it's been more than 5 minutes (default) since last time we got anything from erlang, a timestamp is written in the log. The "ALIVE" messages look like this:
===== ALIVE <date-time-string>
while the other timestamps look like this:
date-time-string is the date and time the message is written, default in local time (can be changed to GMT if one wants to) and is formatted with the ANSI-C function
strftime using the format string
%a %b %e %T %Z %Y, which produces messages on the line of
===== ALIVE Thu May 15 10:13:36 MEST 2003, this can be changed, see below.
The following environment variables are recognized by run_erl and change the logging behavior. Also see the notes above to get more info on how the log behaves.
"%e-%b-%Y, %T %Z"will give log messages with timestamps looking like
15-May-2003, 10:23:04 METetc. See the documentation for the C library function strftime for more information. Default is
"%a %b %e %T %Z %Y".
saslcan be modified accordingly by setting the erlang application variable
© 1999–2016 Ericsson AB
Licensed under the Apache License, Version 2.0.