This section describes the os_mon
application in
Erlang. The OS Monitoring application provides the following
services:
cpu_sup
disksup
memsup
os_sup
The following configuration parameters are defined for the OS Monitoring application. Refer to application(3) for more information about configuration parameters.
start_disksup = bool() <optional>
disksup
should be started. The
default is true
.
start_memsup = bool() <optional>
memsup
should be started. The
default is true
.
start_os_sup = bool() <optional>
os_sup
should be started. The
default is false
.
disk_space_check_interval = integer()
<optional>
disksup
process should check the disk space. The
default is 30 minutes.disk_almost_full_threshold =
float() <optional>
disk_almost_full
alarm is set. The default is 0.80
(80%).memory_check_interval = integer()
<optional>
memsup
process should check the memory. The default
is one minute.system_memory_high_watermark =
float() <optional>
process_memory_high_watermark = float()
<optional>
memsup_helper_timeout = integer() (>= 1) <optional>
memsup
process should use when communicating with the memsup_helper
process (an application internal server). Defaults to 30
seconds.
memsup_system_only = bool() <optional>
memsup
should only collect
system memory usage (and not Erlang process memory usage).
Default is false
(meaning that information both system
memory usage and Erlang process memory usage will be collected).
os_sup_own = string()
syslogd
, and the named pipe to
receive the messages from syslogd
.
os_sup_syslogconf = string()
syslogd
.
os_sup_errortag = atom()
syslogd
before forwarding them to the error logger in the Erlang runtime
system.
The following MIBs are defined in OS_MON:
The MIB is stored in the mibs
directory. It is
defined in SNMPv2 SMI syntax. An SNMPv1 version of the mib is
delivered in the mibs/v1
directory.
The compiled MIB is located under priv/mibs
, and the
generated .hrl
file under the include
directory.
To compile a MIB that IMPORTS the OTP-OS-MON-MIB
,
give the option {il, ["os_mon/priv/mibs"]}
to the MIB
compiler.
If the MIB should be used in a system, it should be loaded
into an agent with a call to os_mon_mib:load(Agent)
, where
Agent
is the Pid or registered name of an SNMP agent.
Use os_mon_mib:unload(Agent)
to unload the MIB. The
implementation of this MIB uses Mnesia to store a cache with
data needed. This means that Mnesia must run if this
implementation of the MIB should be used. It also use functions
defined for the OTP-MIB
, thus that MIB must be loaded as
well.
cpu_sup(3), memsup(3), disksup(3), os_sup(3), application(3), snmp(6)