From 57c3246511434f42214e113b8902af10ab9cca49 Mon Sep 17 00:00:00 2001 From: xsipewe Date: Tue, 21 Jun 2016 15:50:34 +0200 Subject: erts: Editorial changes --- erts/doc/src/run_erl.xml | 257 ++++++++++++++++++++++++++++------------------- 1 file changed, 152 insertions(+), 105 deletions(-) (limited to 'erts/doc/src/run_erl.xml') diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml index 6b0fef7c0a..21a7f86011 100644 --- a/erts/doc/src/run_erl.xml +++ b/erts/doc/src/run_erl.xml @@ -28,137 +28,184 @@ - 99-12-15 + 1999-12-15 run_erl.xml run_erl - Redirect Erlang input and output streams on Solaris® + Redirect Erlang input and output streams on Solaris. -

This describes the 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 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 .

+

The program is specific to Solaris/Linux. + This program redirects the standard input and standard + output streams so that all output can be logged. It also lets the + program connect to the Erlang console, making + it possible to monitor and debug an embedded system remotely.

+ +

For more information about the use, see the + + Embedded System User's Guide in System Documentation.

+ - run_erl [-daemon] pipe_dir/ log_dir "exec command [command_arguments]" - Start the Erlang emulator without attached terminal + run_erl [-daemon] pipe_dir/ log_dir "exec command + [command_arguments]" + Start the Erlang emulator without attached terminal. -

The program arguments are:

+

Arguments:

- -daemon - This option is highly recommended. It makes run_erl run in - the background completely detached from any controlling - terminal and the command returns to the caller immediately. - Without this option, run_erl must be started using several - tricks in the shell to detach it completely from the - terminal in use when starting it. The option must be the - first argument to run_erl on the command line. - pipe_dir - This is where to put the named pipe, usually - . It shall be suffixed by a (slash), - i.e. not , but . - log_dir - This is where the log files are written. There will be one - log file, that log progress and - warnings from the program 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 will delete - and reuse the oldest log file. - "exec command [command_arguments]" - In the third argument is the to execute - where everything written to stdin and stdout is logged to - . + -daemon + +

This option is highly recommended. It makes run_erl run + in the background completely detached from any controlling + terminal and the command returns to the caller immediately. + Without this option, run_erl must be started using several + tricks in the shell to detach it completely from the + terminal in use when starting it. The option must be the + first argument to run_erl on the command line.

+
+ pipe_dir + +

The named pipe, usually . It must be + suffixed by a (slash), that is, + , not + .

+
+ log_dir + +

The log files, that is:

+ + +

One log file, , which logs + progress and warnings from the + program itself.

+
+ +

Up to five log files at maximum 100 KB each with the content + of the standard streams from and to the command. (Both the + number of logs and sizes can be changed by environment + variables, see section Environment Variables + below.)

+

When the logs are full, deletes + and reuses the oldest log file.

+
+
+
+ "exec command [command_arguments]" + +

In the third argument, is the + executable to execute where everything written to stdin + and stdout is logged to .

+
- Notes concerning the log files -

While running, run_erl (as stated earlier) sends all output, - uninterpreted, to a log file. The file is called - , where N is a number. When the log is "full", - default after 100KB, run_erl starts to log in file - , 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:

+ Notes concerning the Log Files +

While running, run_erl (as stated earlier) sends all output, + uninterpreted, to a log file. The file is named + , where N is an integer. When the + log is "full" (default log size is 100 KB), run_erl starts to log + in file , until N reaches a + certain number (default 5), whereupon 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 time stamp and is written, by default, + after 15 minutes of inactivity. Also, if output from Erlang is + logged, but more than 5 minutes (default) has passed since last time + we got anything from Erlang, a time stamp is written in the + log. The "ALIVE" messages look as follows:

+ - ]]> -

while the other timestamps look like this:

+===== ALIVE ]]> + +

The other time stamps look as follows:

+ - ]]> -

The 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 - using the format string , which produces - messages on the line of , this can be changed, see below.

+===== ]]> + +

is the date and time the message is + written, default in local time (can be changed to UTC if needed). + It is formatted with the ANSI-C function + using the format string , which + produces messages like + ; this can + be changed, see the next section.

- Environment variables -

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.

+ + Environment Variables +

The following environment variables are recognized by run_erl + and change the logging behavior. For more information, see the previous + section.

+ - RUN_ERL_LOG_ALIVE_MINUTES - How long to wait for output (in minutes) before writing an - "ALIVE" message to the log. Default is 15, can never be less - than 1. - RUN_ERL_LOG_ACTIVITY_MINUTES - How long erlang need to be inactive before output will be - preceded with a timestamp. Default is - RUN_ERL_LOG_ALIVE_MINUTES div 3, but never less than 1. - RUN_ERL_LOG_ALIVE_FORMAT - Specifies another format string to be used in the strftime - C library call. i.e specifying this to - will give log messages with timestamps looking like - etc. See the documentation - for the C library function strftime for more - information. Default is . - RUN_ERL_LOG_ALIVE_IN_UTC - If set to anything else than "0", it will make all - times displayed by run_erl to be in UTC (GMT,CET,MET, without - DST), rather than - in local time. This does not affect data coming from erlang, - only the logs output directly by run_erl. The application - can be modified accordingly by setting the erlang - application variable to . - RUN_ERL_LOG_GENERATIONS - Controls the number of log files written before older - files are being reused. Default is 5, minimum is 2, maximum is 1000. - RUN_ERL_LOG_MAXSIZE - The size (in bytes) of a log file before switching to a - new log file. Default is 100000, minimum is 1000 and maximum is - approximately 2^30. - RUN_ERL_DISABLE_FLOWCNTRL - If defined, disables input and output flow control for the pty opend by run_erl. - Useful if you want to remove any risk of accidentally blocking the flow control - by hit Ctrl-S (instead of Ctrl-D to detach). - Which may result in blocking of the entire beam process - and in the case of running heart as supervisor - even the heart process will be blocked when writing log message to terminal. - Leaving the heart process unable to do its work. + RUN_ERL_LOG_ALIVE_MINUTES + +

How long to wait for output (in minutes) before writing an + "ALIVE" message to the log. Defaults to 15, minimum is 1.

+
+ RUN_ERL_LOG_ACTIVITY_MINUTES + +

How long Erlang needs to be inactive before output is + preceded with a time stamp. Defaults to + RUN_ERL_LOG_ALIVE_MINUTES div 3, minimum is 1.

+
+ RUN_ERL_LOG_ALIVE_FORMAT + +

Specifies another format string to be used in the strftime + C library call. That is, specifying this to + gives + log messages with time stamps like + . For more information, + see the documentation for the C library function strftime. + Defaults to .

+
+ RUN_ERL_LOG_ALIVE_IN_UTC + +

If set to anything else than 0, it makes all + times displayed by run_erl to be in UTC (GMT, CET, MET, + without Daylight Saving Time), rather than in local time. + This does not affect data coming from Erlang, + only the logs output directly by run_erl. Application + SASL can be modified accordingly by setting the Erlang + application variable to + .

+
+ RUN_ERL_LOG_GENERATIONS + +

Controls the number of log files written before older + files are reused. Defaults to 5, minimum is 2, maximum is 1000.

+
+ RUN_ERL_LOG_MAXSIZE + +

The size, in bytes, of a log file before switching to a + new log file. Defaults to 100000, minimum is 1000, maximum is + about 2^30.

+
+ RUN_ERL_DISABLE_FLOWCNTRL + +

If defined, disables input and output flow control for the pty + opend by run_erl. Useful if you want to remove any risk of + accidentally blocking the flow control by using Ctrl-S (instead of + Ctrl-D to detach), which can result in blocking of the entire Beam + process, and in the case of running heart as supervisor even the + heart process becomes blocked when writing log message to terminal, + leaving the heart process unable to do its work.

+
- SEE ALSO -

start(1), start_erl(1)

+ See Also +

start(1), + start_erl(1)

-- cgit v1.2.3