This document describes the changes made to the OS_Mon application.
alarm_handler:get_alarms/0
was
introduced in memsup
and disksup
. This will
lead to problems if the default alarm_handler
event handler is not used, however, and the call has now
been removed. (Thanks to Serge Aleynikov for pointing
this out.)cpu_sup
to crash
has been corrected.A note on backwards compatibility: The behaviour of OS_Mon 2.0 is backwards compatible under normal operation, but has changed somewhat in error situations: The services do not terminate and the API functions do not raise exceptions in all cases where they did before. Also, in the case where a service does terminate, the exit reason may be different. See below for details.
memsup_system_only
to
true
did not work, but would crash the
memsup
process.
cpu_sup:nprocs/0
returned 0 on FreeBsd.
disksup
or memsup
was
restarted, the same alarm could be set twice. Also, set
alarms were not cleared when the application was stopped.
disksup
and
memsup
are now configurable in run-time.
memsup
can now handle systems with more than 4GB
of RAM.
error_logger
is used
to warn the user if/when such errors occurs. Also, in the
case of unrecoverable errors, the services have been made
more homogeneous with respect to behavior and exit
reasons. See below for more information and refer to the
man pages for details.
{port_error,Garbage}
or {port_died,Reason}
,
respectively.
disksup
) or cause application termination
(memsup
, os_sup
). Instead a warning is
issued and the default value for the parameter is used.
Also, some cases where a bad parameter value accidentally
could be accepted have been corrected.
gen_server-
) calls cause process termination,
whereas unknown casts and messages are now ignored by all
OS_Mon services.
os_sup
service:
nteventlog
as backend.
syslogd
etc.) can now
be done outside the os_sup
process. The reason for
this is that the Erlang emulator should normally not be
run with root
privileges, as is otherwise
required. The new application configuration parameter
os_sup_config
must be set to false
.
os_sup
can now be configured using a new
configuration parameter os_sup_mfa
to call an
arbitrary Erlang function when a message is received from
the OS.
memsup
service has been rewritten, replacing
the supervised memsup_helper
with a linked help
process. This gives the memsup
process more
control and prevents a situation where it gets out of
synch with the received memory data and thus possibly
returns erroneous results.
cpu_sup:util/0
failed with error reason
negative_diff
when called the first time on a
machine (hw) that had been up for a very long time.
get_memory_data/0
,
get_system_memory_data/0
) now do not fail, but
return the previously collected value, if any, or a dummy
value otherwise. Also, a warning message is printed.
memsup.c
will now compile on OpenBSD. (Thanks to
Geoff White and Jay Nelson.)disksup
and cpu_sup
modules now work on
Mac OS X (tested on Mac OS 10.3.8).memsup
module should now work on Linux 2.6.* as
well as on older Linuxes. (/proc/meminfo
has
slightly different formats in different releases of
Linux.)This version is identical with 1.7.