194 lines
		
	
	
		
			8.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			194 lines
		
	
	
		
			8.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<!DOCTYPE html>
 | 
						|
 | 
						|
<html  lang="en">
 | 
						|
  <head>
 | 
						|
    <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
 | 
						|
 | 
						|
    <title>diskmon — SeisComP Release documentation</title>
 | 
						|
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 | 
						|
    <link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
 | 
						|
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
 | 
						|
    <link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
 | 
						|
    <link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
 | 
						|
    <script type="text/javascript" src="../_static/seiscomp.js"></script>
 | 
						|
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
 | 
						|
    <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
 | 
						|
    <script src="../_static/doctools.js?v=888ff710"></script>
 | 
						|
    <script src="../_static/sphinx_highlight.js?v=4825356b"></script>
 | 
						|
    <link rel="index" title="Index" href="../genindex.html" />
 | 
						|
    <link rel="search" title="Search" href="../search.html" />
 | 
						|
    <link rel="next" title="kernel" href="kernel.html" />
 | 
						|
    <link rel="prev" title="System" href="../toc/system.html" /> 
 | 
						|
  </head>
 | 
						|
  <body>
 | 
						|
    <div class="header">
 | 
						|
      <div class="container">
 | 
						|
        <div class="brand">
 | 
						|
          <img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
 | 
						|
           <!-- span class="title">SeisComP Release</span -->
 | 
						|
          <span class="version">6.9.1</span>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
    <div class="nav">
 | 
						|
      <div class="container">
 | 
						|
        <div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
 | 
						|
          
 | 
						|
    <div class="related" role="navigation" aria-label="related navigation">
 | 
						|
      <ul>
 | 
						|
        <li class="right">
 | 
						|
          <a href="../genindex.html" title="General Index"
 | 
						|
             accesskey="I">
 | 
						|
            index
 | 
						|
          </a>
 | 
						|
        </li>
 | 
						|
        <li class="right">
 | 
						|
          <a href="kernel.html" title="kernel"
 | 
						|
             accesskey="N">
 | 
						|
            next
 | 
						|
          </a>
 | 
						|
        </li>
 | 
						|
        <li class="right">
 | 
						|
          <a href="../toc/system.html" title="System"
 | 
						|
             accesskey="P">
 | 
						|
            previous
 | 
						|
          </a>
 | 
						|
        </li>
 | 
						|
        <li class="nav-item nav-item-0">
 | 
						|
          <a href="../index.html">Home</a>
 | 
						|
        </li>
 | 
						|
        <li class="nav-item nav-item-1">
 | 
						|
          <a href="../modules.html" >Modules</a>
 | 
						|
        </li>
 | 
						|
        <li class="nav-item nav-item-2">
 | 
						|
          <a href="../toc/system.html" accesskey="U">System</a>
 | 
						|
        </li> 
 | 
						|
      </ul>
 | 
						|
    </div>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
    <div class="container">
 | 
						|
      <div class="fitted content" id="anchors-container">
 | 
						|
        <div class="body" role="main">
 | 
						|
          
 | 
						|
  <section id="diskmon">
 | 
						|
<span id="id1"></span><h1>diskmon<a class="headerlink" href="#diskmon" title="Permalink to this heading">¶</a></h1>
 | 
						|
<p><strong>Monitors a disk and sends notifications.</strong></p>
 | 
						|
<section id="description">
 | 
						|
<h2>Description<a class="headerlink" href="#description" title="Permalink to this heading">¶</a></h2>
 | 
						|
<p>Diskmon is a SeisComP init script that checks on each call to <strong class="program">seiscomp check</strong>
 | 
						|
the filesystem by running the following command:</p>
 | 
						|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>df<span class="w"> </span><span class="p">|</span><span class="w"> </span>awk<span class="w"> </span>-v<span class="w"> </span><span class="nv">max</span><span class="o">=</span><span class="s2">"%d"</span><span class="w"> </span><span class="se">\'</span><span class="o">{</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="o">(</span><span class="w"> </span><span class="nv">$5</span><span class="w"> </span>><span class="w"> </span>max<span class="w"> </span><span class="o">)</span><span class="w"> </span>print<span class="w"> </span><span class="nv">$0</span><span class="w"> </span><span class="o">}</span><span class="se">\'</span>
 | 
						|
</pre></div>
 | 
						|
</div>
 | 
						|
<p>where “%d” is replaced by the configured threshold. If there are lines in the
 | 
						|
output (which means some filesystem exceed the usage threshold) it sends
 | 
						|
the output along with a description line to all configured receipients using
 | 
						|
the <strong class="program">mail</strong> command.</p>
 | 
						|
<p>To make diskmon work it is important that <strong class="program">mail</strong> is working on the shell.</p>
 | 
						|
</section>
 | 
						|
<section id="module-configuration">
 | 
						|
<span id="diskmon-configuration"></span><h2>Module Configuration<a class="headerlink" href="#module-configuration" title="Permalink to this heading">¶</a></h2>
 | 
						|
<div class="admonition note">
 | 
						|
<p class="admonition-title">Note</p>
 | 
						|
<p>diskmon is a <a class="reference internal" href="../base/glossary.html#term-standalone-module"><span class="xref std std-term">standalone module</span></a> and does not inherit <a class="reference internal" href="global.html#global-configuration"><span class="std std-ref">global options</span></a>.</p>
 | 
						|
</div>
 | 
						|
<div class="line-block">
 | 
						|
<div class="line"><code class="file docutils literal notranslate"><span class="pre">etc/defaults/diskmon.cfg</span></code></div>
 | 
						|
<div class="line"><code class="file docutils literal notranslate"><span class="pre">etc/diskmon.cfg</span></code></div>
 | 
						|
<div class="line"><code class="file docutils literal notranslate"><span class="pre">~/.seiscomp/diskmon.cfg</span></code></div>
 | 
						|
</div>
 | 
						|
<dl class="std confval">
 | 
						|
<dt class="sig sig-object std" id="confval-threshold">
 | 
						|
<span class="sig-name descname"><span class="pre">threshold</span></span><a class="headerlink" href="#confval-threshold" title="Permalink to this definition">¶</a></dt>
 | 
						|
<dd><p>Default: <code class="docutils literal notranslate"><span class="pre">95</span></code></p>
 | 
						|
<p>Type: <em>int</em></p>
 | 
						|
<p>Disk usage threshold in percent. Each time when the disk usage exceeds this level,
 | 
						|
an alert e-mail is send to the user. Note that disk usage is only checked when a
 | 
						|
cron job of seiscomp check is installed or seiscomp check is called
 | 
						|
regularly by other means.</p>
 | 
						|
</dd></dl>
 | 
						|
 | 
						|
<dl class="std confval">
 | 
						|
<dt class="sig sig-object std" id="confval-emails">
 | 
						|
<span class="sig-name descname"><span class="pre">emails</span></span><a class="headerlink" href="#confval-emails" title="Permalink to this definition">¶</a></dt>
 | 
						|
<dd><p>Type: <em>list:string</em></p>
 | 
						|
<p>Comma-separated list of e-mail addresses to notify when disk usage
 | 
						|
threshold is exceeded.</p>
 | 
						|
</dd></dl>
 | 
						|
 | 
						|
</section>
 | 
						|
</section>
 | 
						|
 | 
						|
 | 
						|
          <div id="anchors-bottom"></div>
 | 
						|
        </div>
 | 
						|
        
 | 
						|
      <div class="sidebar" role="navigation" aria-label="main navigation">
 | 
						|
        <div id="anchors-top"></div>
 | 
						|
        <div id="anchors" class="content">
 | 
						|
<div id="searchbox" style="display: none" role="search">
 | 
						|
  <h3 id="searchlabel">Quick search</h3>
 | 
						|
    <div class="searchformwrapper">
 | 
						|
    <form class="search" action="../search.html" method="get">
 | 
						|
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
 | 
						|
      <input type="submit" value="Go" />
 | 
						|
    </form>
 | 
						|
    </div>
 | 
						|
</div>
 | 
						|
<script>document.getElementById('searchbox').style.display = "block"</script>
 | 
						|
  <div>
 | 
						|
    <h3><a href="../index.html">Table of Contents</a></h3>
 | 
						|
    <ul>
 | 
						|
<li><a class="reference internal" href="#">diskmon</a><ul>
 | 
						|
<li><a class="reference internal" href="#description">Description</a></li>
 | 
						|
<li><a class="reference internal" href="#module-configuration">Module Configuration</a></li>
 | 
						|
</ul>
 | 
						|
</li>
 | 
						|
</ul>
 | 
						|
 | 
						|
  </div>
 | 
						|
  <div>
 | 
						|
    <h4>Previous topic</h4>
 | 
						|
    <p class="topless"><a href="../toc/system.html"
 | 
						|
                          title="previous chapter">System</a></p>
 | 
						|
  </div>
 | 
						|
  <div>
 | 
						|
    <h4>Next topic</h4>
 | 
						|
    <p class="topless"><a href="kernel.html"
 | 
						|
                          title="next chapter">kernel</a></p>
 | 
						|
  </div>
 | 
						|
  <div role="note" aria-label="source link">
 | 
						|
    <h3>This Page</h3>
 | 
						|
    <ul class="this-page-menu">
 | 
						|
      <li><a href="../_sources/apps/diskmon.rst.txt"
 | 
						|
            rel="nofollow">Show Source</a></li>
 | 
						|
    </ul>
 | 
						|
   </div>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
    <div class="footer">
 | 
						|
      <div class="container">
 | 
						|
        <div class="horizontal layout content">
 | 
						|
        <a class="fade-in" href="https://www.gempa.de" target="_blank">
 | 
						|
          <img class="brand" src="../_static/brands/gempa.svg"/>
 | 
						|
        </a>
 | 
						|
        <div class="stretched align-center fitted content">
 | 
						|
          <div>
 | 
						|
		  Version <b>6.9.1</b> Release
 | 
						|
          </div>
 | 
						|
            <div class="copyright">
 | 
						|
              Copyright © gempa GmbH, GFZ Potsdam.
 | 
						|
            </div>
 | 
						|
        </div>
 | 
						|
        <a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
 | 
						|
          <img class="brand" src="../_static/brands/gfz.svg"/>
 | 
						|
        </a>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
  </body>
 | 
						|
</html> |