Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1131

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- disksup</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/os_mon-2.2.10.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>OS_Mon</strong><br><strong>Reference Manual</strong><br><small>Version 2.2.10</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li title="os_mon (App)"><a href="os_mon_app.html">os_mon (App)
                </a></li>
<li id="no" title="cpu_sup " expanded="false">cpu_sup<ul>
<li><a href="cpu_sup.html">
                  Top of manual page
                </a></li>
<li title="nprocs-0"><a href="cpu_sup.html#nprocs-0">nprocs/0</a></li>
<li title="avg1-0"><a href="cpu_sup.html#avg1-0">avg1/0</a></li>
<li title="avg5-0"><a href="cpu_sup.html#avg5-0">avg5/0</a></li>
<li title="avg15-0"><a href="cpu_sup.html#avg15-0">avg15/0</a></li>
<li title="util-0"><a href="cpu_sup.html#util-0">util/0</a></li>
<li title="util-1"><a href="cpu_sup.html#util-1">util/1</a></li>
</ul>
</li>
<li id="loadscrollpos" title="disksup " expanded="true">disksup<ul>
<li><a href="disksup.html">
                  Top of manual page
                </a></li>
<li title="get_disk_data-0"><a href="disksup.html#get_disk_data-0">get_disk_data/0</a></li>
<li title="get_check_interval-0"><a href="disksup.html#get_check_interval-0">get_check_interval/0</a></li>
<li title="set_check_interval-1"><a href="disksup.html#set_check_interval-1">set_check_interval/1</a></li>
<li title="get_almost_full_threshold-0"><a href="disksup.html#get_almost_full_threshold-0">get_almost_full_threshold/0</a></li>
<li title="set_almost_full_threshold-1"><a href="disksup.html#set_almost_full_threshold-1">set_almost_full_threshold/1</a></li>
</ul>
</li>
<li id="no" title="memsup " expanded="false">memsup<ul>
<li><a href="memsup.html">
                  Top of manual page
                </a></li>
<li title="get_memory_data-0"><a href="memsup.html#get_memory_data-0">get_memory_data/0</a></li>
<li title="get_system_memory_data-0"><a href="memsup.html#get_system_memory_data-0">get_system_memory_data/0</a></li>
<li title="get_os_wordsize-0"><a href="memsup.html#get_os_wordsize-0">get_os_wordsize/0</a></li>
<li title="get_check_interval-0"><a href="memsup.html#get_check_interval-0">get_check_interval/0</a></li>
<li title="set_check_interval-1"><a href="memsup.html#set_check_interval-1">set_check_interval/1</a></li>
<li title="get_procmem_high_watermark-0"><a href="memsup.html#get_procmem_high_watermark-0">get_procmem_high_watermark/0</a></li>
<li title="set_procmem_high_watermark-1"><a href="memsup.html#set_procmem_high_watermark-1">set_procmem_high_watermark/1</a></li>
<li title="get_sysmem_high_watermark-0"><a href="memsup.html#get_sysmem_high_watermark-0">get_sysmem_high_watermark/0</a></li>
<li title="set_sysmem_high_watermark-1"><a href="memsup.html#set_sysmem_high_watermark-1">set_sysmem_high_watermark/1</a></li>
<li title="get_helper_timeout-0"><a href="memsup.html#get_helper_timeout-0">get_helper_timeout/0</a></li>
<li title="set_helper_timeout-1"><a href="memsup.html#set_helper_timeout-1">set_helper_timeout/1</a></li>
</ul>
</li>
<li id="no" title="os_mon_mib " expanded="false">os_mon_mib<ul>
<li><a href="os_mon_mib.html">
                  Top of manual page
                </a></li>
<li title="load-1"><a href="os_mon_mib.html#load-1">load/1</a></li>
<li title="unload-1"><a href="os_mon_mib.html#unload-1">unload/1</a></li>
</ul>
</li>
<li id="no" title="os_sup " expanded="false">os_sup<ul>
<li><a href="os_sup.html">
                  Top of manual page
                </a></li>
<li title="enable-0"><a href="os_sup.html#enable-0">enable/0</a></li>
<li title="enable-2"><a href="os_sup.html#enable-2">enable/2</a></li>
<li title="disable-0"><a href="os_sup.html#disable-0">disable/0</a></li>
<li title="disable-2"><a href="os_sup.html#disable-2">disable/2</a></li>
</ul>
</li>
<li id="no" title="nteventlog " expanded="false">nteventlog<ul>
<li><a href="nteventlog.html">
                  Top of manual page
                </a></li>
<li title="start-2"><a href="nteventlog.html#start-2">start/2</a></li>
<li title="start_link-2"><a href="nteventlog.html#start_link-2">start_link/2</a></li>
<li title="stop-0"><a href="nteventlog.html#stop-0">stop/0</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>disksup</h1></center>
  
  <h3>MODULE</h3>
<div class="REFBODY">disksup</div>
  <h3>MODULE SUMMARY</h3>
<div class="REFBODY">A Disk Supervisor Process</div>
  <h3>DESCRIPTION</h3>
<div class="REFBODY"><p>
    <p><span class="code">disksup</span> is a process which supervises the available disk
      space in the system. It is part of the OS_Mon application, see
      <span class="bold_code"><a href="os_mon_app.html">os_mon(6)</a></span>. Available for Unix
      and Windows.</p>
    <p>Periodically checks the disks. For each disk or partition which
      uses more than a certain amount of the available space, the alarm
      <span class="code">{{disk_almost_full, MountedOn}, []}</span> is set.</p>
    <dl>
      <dt><strong>On Unix</strong></dt>
      <dd>
        <p>All (locally) mounted disks are checked, including the swap
          disk if it is present.</p>
      </dd>
      <dt><strong>On WIN32</strong></dt>
      <dd>
        <p>All logical drives of type "FIXED_DISK" are checked.</p>
      </dd>
    </dl>
    <p>Alarms are reported to the SASL alarm handler, see
      <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','sasl','alarm_handler.html');">alarm_handler(3)</a></span>.
      To set an alarm, <span class="code">alarm_handler:set_alarm(Alarm)</span> is called
      where <span class="code">Alarm</span> is the alarm specified above.</p>
    <p>The alarms are cleared automatically when the alarm cause is no
      longer valid.</p>
  </p></div>

  <h3><a name="id63562">Configuration</a></h3>
<div class="REFBODY">
    <a name="config"></a>
    
    <p>The following configuration parameters can be used to change
      the default values for time interval and threshold:</p>
    <dl>
      <dt><strong><span class="code">disk_space_check_interval = int()&gt;0</span></strong></dt>
      <dd>
        <p>The time interval, in minutes, for the periodic disk space
          check. The default is 30 minutes.</p>
      </dd>
      <dt><strong><span class="code">disk_almost_full_threshold = float()</span></strong></dt>
      <dd>
        <p>The threshold, as percentage of total disk space, for how
          much disk can be utilized before the <span class="code">disk_almost_full</span>
          alarm is set. The default is 0.80 (80%).</p>
      </dd>
    </dl>
    <p>See <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','kernel','config.html');">config(4)</a></span> for
      information about how to change the value of configuration
      parameters.</p>
  </div>
  <h3>EXPORTS</h3>
    <p><a name="get_disk_data-0"><span class="bold_code">get_disk_data() -&gt; [DiskData]</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">DiskData = {Id, KByte, Capacity}</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code"> Id = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code"> KByte = int()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code"> Capacity = int()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Returns the result of the latest disk check. <span class="code">Id</span> is a
          string that identifies the disk or partition. <span class="code">KByte</span> is
          the total size of the disk or partition in kbytes.
          <span class="code">Capacity</span> is the percentage of disk space used.</p>
        <p>The function is asynchronous in the sense that it does not
          invoke a disk check, but returns the latest available value.</p>
        <p>Returns <span class="code">[{"none",0,0}]</span> if <span class="code">disksup</span> is not
          available.</p>
      </p></div>
    <p><a name="get_check_interval-0"><span class="bold_code">get_check_interval() -&gt; MS</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">MS = int()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Returns the time interval, in milliseconds, for the periodic
          disk space check.</p>
      </p></div>
    <p><a name="set_check_interval-1"><span class="bold_code">set_check_interval(Minutes) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Minutes = int()&gt;=1</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Changes the time interval, given in minutes, for the periodic
          disk space check.</p>
        <p>The change will take effect after the next disk space check
          and is non-persist. That is, in case of a process restart,
          this value is forgotten and the default value will be used.
          See <span class="bold_code"><a href="#config">Configuration</a></span> above.</p>
      </p></div>
    <p><a name="get_almost_full_threshold-0"><span class="bold_code">get_almost_full_threshold() -&gt; Percent</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Percent = int()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Returns the threshold, in percent, for disk space utilization.</p>
      </p></div>
    <p><a name="set_almost_full_threshold-1"><span class="bold_code">set_almost_full_threshold(Float) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Float = float(), 0=&lt;Float=&lt;1</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Changes the threshold, given as a float, for disk space
          utilization.</p>
        <p>The change will take effect during the next disk space check
          and is non-persist. That is, in case of a process restart,
          this value is forgotten and the default value will be used.
          See <span class="bold_code"><a href="#config">Configuration</a></span> above.</p>
      </p></div>
  

  <h3><a name="id63816">See Also</a></h3>
<div class="REFBODY">
    
    <p><span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','sasl','alarm_handler.html');">alarm_handler(3)</a></span>,
      <span class="bold_code"><a href="os_mon_app.html">os_mon(3)</a></span></p>
  </div>
</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>