HEX
Server: nginx/1.16.1
System: Linux ecs-04358622 4.19.90-2107.6.0.0100.oe1.bclinux.x86_64 #1 SMP Wed Dec 1 19:59:44 CST 2021 x86_64
User: nginx (994)
PHP: 8.0.0
Disabled: NONE
Upload Files
File: //usr/share/doc/rsyslog/html/concepts/janitor.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>The Janitor Process &#8212; rsyslog 8.2006.0 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/rsyslog.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '8.2006.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Message parsers in rsyslog" href="messageparser.html" />
    <link rel="prev" title="Understanding rsyslog Queues" href="queues.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="messageparser.html" title="Message parsers in rsyslog"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="queues.html" title="Understanding rsyslog Queues"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">rsyslog 8.2006.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Concepts</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="the-janitor-process">
<h1>The Janitor Process<a class="headerlink" href="#the-janitor-process" title="Permalink to this headline">¶</a></h1>
<p>The janitor process carries out periodic cleanup tasks. For example,
it is used by
<a class="reference internal" href="../configuration/modules/omfile.html"><span class="doc">omfile</span></a>
to close files after a timeout has expired.</p>
<p>The janitor runs periodically. As such, all tasks carried out via the
janitor will be activated based on the interval at which it runs. This
means that all janitor-related times set are approximate and should be
considered as “no earlier than” (NET). If, for example, you set a timeout
to 5 minutes and the janitor is run in 10-minute intervals, the timeout
may actually happen after 5 minutes, but it may also take up to 20
minutes for it to be detected.</p>
<p>In general (see note about HUP below), janitor based activities scheduled
to occur after <em>n</em> minutes will occur after <em>n</em> and <em>(n + 2*janitorInterval)</em>
minutes.</p>
<p>To reduce the potential delay caused by janitor invocation,
<a class="reference internal" href="../rainerscript/global.html#global-janitorinterval"><span class="std std-ref">the interval at which the janitor runs can be be adjusted</span></a>.
If high precision is
required, it should be set to one minute. Janitor-based activities will
still be NET times, but the time frame will be much smaller. In the
example with the file timeout, it would be between 5 and 6 minutes if the
janitor is run at a one-minute interval.</p>
<p>Note that the more frequent the janitor is run, the more frequent the
system needs to wakeup from potential low power state. This is no issue
for data center machines (which usually always run at full speed), but it
may be an issue for power-constrained environments like notebooks. For
such systems, a higher janitor interval may make sense.</p>
<p>As a special case, sending a HUP signal to rsyslog also activate the
janitor process. This can lead to too-frequent wakeups of janitor-related
services. However, we don’t expect this to cause any issues. If it does,
it could be solved by creating a separate thread for the janitor. But as
this takes up some system resources and is not not considered useful, we
have not implemented it that way. If the HUP/janitor interaction causes
problems, let the rsyslog team know and we can change the implementation.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p>Help with configuring/using <code class="docutils literal"><span class="pre">Rsyslog</span></code>:</p>
<ul class="last simple">
<li><a class="reference external" href="http://lists.adiscon.net/mailman/listinfo/rsyslog">Mailing list</a> - best route for general questions</li>
<li>GitHub: <a class="reference external" href="https://github.com/rsyslog/rsyslog/">rsyslog source project</a> - detailed questions, reporting issues
that are believed to be bugs with <code class="docutils literal"><span class="pre">Rsyslog</span></code></li>
<li>Stack Exchange (<a class="reference external" href="https://stackexchange.com/filters/327462/rsyslog">View</a>, <a class="reference external" href="https://serverfault.com/questions/ask?tags=rsyslog">Ask</a>)
- experimental support from rsyslog community</li>
</ul>
</div>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p>Contributing to <code class="docutils literal"><span class="pre">Rsyslog</span></code>:</p>
<ul class="last simple">
<li>Source project: <a class="reference external" href="https://github.com/rsyslog/rsyslog/blob/master/README.md">rsyslog project README</a>.</li>
<li>Documentation: <a class="reference external" href="https://github.com/rsyslog/rsyslog-doc/blob/master/README.md">rsyslog-doc project README</a></li>
</ul>
</div>
<p>Copyright 2008-2020 <a class="reference external" href="https://rainer.gerhards.net/">Rainer Gerhards</a>
(<a class="reference external" href="https://www.rainer-gerhards.de/grossrinderfeld/">Großrinderfeld</a>),
and Others.</p>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="queues.html"
                        title="previous chapter">Understanding rsyslog Queues</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="messageparser.html"
                        title="next chapter">Message parsers in rsyslog</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/concepts/janitor.rst.txt"
           rel="nofollow">Show Source</a></li>
    <li><a href="https://github.com/rsyslog/rsyslog-doc/edit/master/source/concepts/janitor.rst"
           rel="nofollow">Edit on GitHub</a></li>
  </ul>

<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="messageparser.html" title="Message parsers in rsyslog"
             >next</a> |</li>
        <li class="right" >
          <a href="queues.html" title="Understanding rsyslog Queues"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">rsyslog 8.2006.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >Concepts</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
    </div>
  </body>
</html>