summaryrefslogtreecommitdiffstats
path: root/doc/debug.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/debug.html')
-rw-r--r--doc/debug.html38
1 files changed, 32 insertions, 6 deletions
diff --git a/doc/debug.html b/doc/debug.html
index 6aeb7975..537cd6b4 100644
--- a/doc/debug.html
+++ b/doc/debug.html
@@ -27,7 +27,7 @@ be replaced by something else.</p>
<p>There are two environment variables that set several debug settings:
<ul>
<li>The "RSYSLOG_DEBUGLOG" (sample: &nbsp;RSYSLOG_DEBUGLOG="/path/to/debuglog/")
-writes (allmost)
+writes (almost)
all debug message to the specified log file in addition to stdout. Some
system messages (e.g. segfault or abort message) are not written to the
file as we can not capture them.
@@ -49,8 +49,14 @@ FileTrace=vm.c FileTrace=expr.c"</li>
<li><b>Debug</b> - if present, turns on the debug system and enables debug output
<li><b>DebugOnDemand</b> - if present, turns on the debug system but does not enable
debug output itself. You need to send SIGUSR1 to turn it on when desired.
+<li><b>OutputTidToStderr</b> - if present, makes rsyslog output information about
+the thread id (tid) of newly create processesto stderr. Note that not necessarily
+all new threads are reported (depends on the code, e.g. of plugins). This is
+only available under Linux. This usually does NOT work when privileges have
+been dropped (that's not a bug, but the way it is).
<li><b>help</b> - display a very short list of commands - hopefully a life saver if you can't access the documentation...</li>
</ul>
+<p>Individual options are separated by spaces.</p>
</ul>
<h3>Why Environment Variables?</h3>
<p>You may ask why we use environment variables for debug-system parameters and not
@@ -70,6 +76,26 @@ rsyslog core, we get a number of data structures wrong.
<p>For these reasons, we utilize environment variables to initialize and configure
the debugging system. We understand this may be somewhat painful, but now you know
there are at least some good reasons for doing so.
+<p>HOWEVER, if you have a too hard time to set debug instructions using the environment
+variables, there is a cure, described in the next paragraph.
+
+<h2>Enabling Debug via rsyslog.conf</h2>
+<p>As described in the previous paragraph, enabling debug via rsyslog.conf
+may not be perfect for some debugging needs, but basic debug output will work - and
+that is what most often is requried. There are limited options available, but these
+cover the most important use cases.
+<p>Debug processing is done via legacy config statements. There currently
+is no plan to move these over to the v6+ config system. Availabe settings are
+<ul>
+<li>$DebugFile &lt;filename&gt; - sets the debug file name
+<li>$DebugLevel &lt;0|1|2&gt; - sets the respective debug level, where
+0 means debug off, 1 is debug on demand activated (but debug mode off)
+and 2 is full debug mode.
+</ul>
+<p>Note that in theory it is forbidden to specify these parameters more
+than once. However, we do not enforce that and if it happens results
+are undefined.
+
<h2>Getting debug information from a running Instance</h2>
<p>It is possible to obtain debugging information from a running instance, but this requires
some setup. We assume that the instance runs in the background, so debug output to
@@ -107,7 +133,7 @@ turned on.
threads and their calling stack by sending SIGUSR2. However, the usefulness of that
information is very much depending on rsyslog compile-time settings, must importantly
the --enable-rtinst configure flag. Note that activating this option causes additional overhead
-and slows down rsyslgod considerable. So if you do that, you need to check if it is
+and slows down rsyslogd considerable. So if you do that, you need to check if it is
capable to handle the workload. Also, threading behavior is modified by the
runtime instrumentation.
<p>Sending SIGUSR2 writes new process state information to the log file each time
@@ -117,13 +143,13 @@ some diagnostic information on the current processing state. In that case, turni
on the mutex debugging options (see above) is probably useful.
<h2>Interpreting the Logs</h2>
<p>Debug logs are primarily meant for rsyslog developers. But they may still provide valuable
-information to users. Just be warned that logs sometimes contains informaton the looks like
+information to users. Just be warned that logs sometimes contains information the looks like
an error, but actually is none. We put a lot of extra information into the logs, and there
are some cases where it is OK for an error to happen, we just wanted to record it inside
the log. The code handles many cases automatically. So, in short, the log may not make sense to
you, but it (hopefully) makes sense to a developer. Note that we developers often need
many lines of the log file, it is relatively rare that a problem can be diagnosed by
-looking at just a couple of (hundered) log records.
+looking at just a couple of (hundred) log records.
<h2>Security Risks</h2>
<p>The debug log will reveal potentially sensible information, including user accounts and
passwords, to anyone able to read the log file. As such, it is recommended to properly
@@ -133,12 +159,12 @@ attack or try to hide some information from the log file. As such, it is suggest
enable DebugOnDemand mode only for a reason. Note that when no debug mode is enabled,
SIGUSR1 and SIGUSR2 are completely ignored.
<p>When running in any of the debug modes (including on demand mode), an interactive
-instance of rsyslogd can be aborted by pressing ctl-c.
+instance of rsyslogd can be aborted by pressing ctrl-c.
<p>
<p>[<a href="manual.html">manual index</a>] [<a href="http://www.rsyslog.com/">rsyslog site</a>]</p>
<p><font size="2">This documentation is part of the
<a href="http://www.rsyslog.com/">rsyslog</a> project.<br>
-Copyright &copy; 2008-2010 by <a href="http://www.gerhards.net/rainer">Rainer Gerhards</a> and
+Copyright &copy; 2008-2013 by <a href="http://www.gerhards.net/rainer">Rainer Gerhards</a> and
<a href="http://www.adiscon.com/">Adiscon</a>.
Released under the GNU GPL version 3 or higher.</font></p>
</body>