aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon/src
AgeCommit message (Collapse)Author
2015-06-03Merge branch 'jh/freebsdcpu/OTP-12796'Björn-Egil Dahlberg
* jh/freebsdcpu/OTP-12796: os_mon: Comply with C89 standard os_mon: Update docs for FreeBSD os_mon: Implement cpu_sup:util/0,1 for FreeBSD
2015-05-26os_mon: Implement cpu_sup:util/0,1 for FreeBSDWasif Malik and Johannes Huning
Authors: Wasif Malik and Johannes Huning
2015-05-26Make cpu_sup:util/0 spec lie lessDmitry Ivanov
2015-05-11Merge branch 'aw/native-cpu_sup/OTP-12730'Björn-Egil Dahlberg
* aw/native-cpu_sup/OTP-12730: erts: Fix configure.in os_mon: rename send() to sendi() in cpu_sup.c os_mon: cpu_sup should use native sysctl/libkvm calls on BSD
2015-03-18Handle big loadavg values correctlyViacheslav V. Kovalev
Do not crash with badmatch when integer part of loadavg has more than 2 digits.
2014-12-29os_mon: cpu_sup should use native sysctl/libkvm calls on BSDAlex Wilson
This avoids forking off with os:cmd every time we just want to collect the load averages. riak does this every second, which results in a lot of unnecessary load.
2014-08-29Clarify error for slow `cpu_sup` port initLuca Favatella
I noticed that running an R16B03-1 node on an overloaded host produced log entries like the following ones: ``` 2014-08-22 21:52:31 =ERROR REPORT==== Error in process <0.24112.3> on node '[email protected]' with exit value: {{case_clause,{data,4711}},[{cpu_sup,get_uint32_measurement,2,[{file,"cpu_sup.erl"},{line,227}]},{cpu_sup,measurement_server_loop,1,[{file,"cpu_sup.erl"},{line,585}]}]} ``` ``` ===== ALIVE Fri Aug 22 21:50:14 CEST 2014 [os_mon] cpu supervisor port (cpu_sup): Erlang has closed [os_mon] cpu supervisor port (cpu_sup): Erlang has closed [os_mon] cpu supervisor port (cpu_sup): Erlang has closed [os_mon] cpu supervisor port (cpu_sup): Erlang has closed ===== ALIVE Fri Aug 22 22:07:46 CEST 2014 ``` I performed a code inspection on the `cpu_sup` module and I concluded that the `case_clause` error shows a small issue in the `cpu_sup` module, that happens when the port used in `cpu_sup` is slow to start - as it may happen on an overloaded node. The `cpu_sup` `gen_server` process keeps in its state the pid of an unlinked process (called "measurement server" - see `cpu_sup:init/1`), in order to do dirty stuff (e.g. reading the filesystem, running OS commands) and start_link-ing & managing the connected process to a port (called "port server" - see `measurement_server_init/0`). So the process organization looks like this: ``` cpu_sup - measurement server - port server - port ``` When the measurement server start_links the port server (see `port_server_start/0`) it sends a `{self(), ?ping}` message to it and expects an answer within 6s, otherwise it returns `{error, timeout}` rather than the pid. This has two issues: * The measurement server keeps `{error, ...}` in its state as if it were a pid - that makes no sense; * A late `{Pid, {data,4711}}` response may arrive in the mailbox of the measurement server, that will believe it to be a request to be processed, causing a `case_clause` error. This commit teaches the measurement server to check the success of the initialization of the port server by matching on the return value of `port_server_start/0` (renamed to `port_server_start_link/0` for the sake of clarity) in order to fail earlier and with an error clearer than `{case_clause,{data,4711}}`. In such case I expect the measurement server to be restarted by the `cpu_sup` `gen_server` (see `handle_call/3`) - as before. BTW It is not clear to me when the `handle_info({'EXIT', _Port, Reason}, State)` may be called (the `cpu_sup` `gen_server` does not link to the measurement server) but I am leaving it.
2014-08-06os_mon: Ignore posix_only on windows and solarisLukas Larsson
2014-07-01Add 'disksup_posix_only' parameter to disksupJohannes Weißl
On embedded (Linux) systems the "df" program is very often provided by the Busybox (or Toolbox) project. This version does not provide the "-l" option (for displaying only local filesystems) used in disksup.erl. To make disksup work on these embedded platforms, this patch adds a new application parameter 'disksup_posix_only', to make diskup use only options defined in the POSIX standard: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/df.html
2014-03-20Introduce runtime_dependencies in .app filesRickard Green
Most dependencies introduced are exactly the dependencies to other applications found by xref. That is, there might be real dependencies missing. There might also be pure debug dependencies listed that probably should be removed. Each application has to be manually inspected in order to ensure that all real dependencies are listed. All dependencies introduced are to application versions used in OTP 17.0. This since the previously used version scheme wasn't designed for this, and in order to minimize the work of introducing the dependencies.
2014-02-18Fix non-library appup files according to issue #240Tobias Schlager
Fix the appup files of runtime_tools and os_mon with wildcard version regexps. inets, odbc and ssh regexps have been corrected to match as originally intended.
2013-11-04Merge branch 'maint'Fredrik Gustafsson
2013-10-31Fix incorrect reporting of memory on OS X via memsup.Christopher Meiklejohn
Application memsup should be calculating free memory using the speculative pages, in the same manner that the Activity Monitor and top programs on OS X do. In addition, correct page size to 4096, based on verification of available memory between top, vm_stat and Activity Monitor.
2013-07-22Merge branch 'maint'Björn-Egil Dahlberg
2013-07-18os_mon: Fix openbsd diskspace queriesBjörn-Egil Dahlberg
Use 'df -k -l' to query OpenBSD about diskspace on local disks. Same reasoning as for FreeBSD - additional filesystems without listing them all.
2013-07-18os_mon: Fix freebsd diskspace queriesBjörn-Egil Dahlberg
Use 'df -k -l' to query FreeBSD about diskspace on local disks. Previously 'df' -k -t ufs' was used but this will not handle zfs disks. Just use '-l' instead of listing potential filesystems.
2013-06-12Merge branch 'maint'Björn-Egil Dahlberg
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-03-19[os_mon] Quote path to programs run with open_port({spawn,...Siri Hansen
This is to allow space in the path.
2013-03-15Merge branch 'sm/fix-disksup-susv3/OTP-10945' into maintFredrik Gustafsson
* sm/fix-disksup-susv3/OTP-10945: This patch fixes disksup:get_disk_data for SUSv3, specifically OS X ML
2013-01-31This patch fixes disksup:get_disk_data for SUSv3, specifically OS X MLSriram Melkote
On OS X Mountain Lion, the default output of df command includes iNode used and iNodes free, which apparent what SUSv3 specifies. This breaks the current parse logic and reports incorrect results. This patch adds support for the new format and ensures older versions of OS X produce this format by adding the -i switch (which is now the default). Adding support for this new format rather than changing df output as we'll presumably see this on other platforms eventually.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-23Turn warnings to errors on selected applicationsBjörn Gustavsson
2013-01-18Merge branch 'nox/enable-silent-rules/OTP-10726'Björn-Egil Dahlberg
* nox/enable-silent-rules/OTP-10726: Implement ./otp_build configure --enable-silent-rules
2013-01-15Implement ./otp_build configure --enable-silent-rulesAnthony Ramine
With silent rules, the output of make is less verbose and compilation warnings are easier to spot. Silent rules are disabled by default and can be disabled or enabled at will by make V=0 and make V=1.
2013-01-08os_mon: Remove superfluous match clauseBjörn-Egil Dahlberg
2012-08-31Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: lib/diameter/autoconf/vxworks/sed.general xcomp/README.md
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-07-19os_mon: Remove VxWorksBjörn-Egil Dahlberg
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-05-21Add infinity timeout to os_mon callsGustav Simonsson
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-01-25Look for port in priv/bin/arch/ as well as priv/bin/Lukas Larsson
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-11-30os_mon: Eliminate use of tuple funBjörn Gustavsson
2011-05-20Update copyright yearsBjörn-Egil Dahlberg
2011-04-08Merge branch 'at/os_mon_dragonfly_support' into devHenrik Nord
* at/os_mon_dragonfly_support: Add support for DragonFlyBSD to memsup OTP-9217
2011-04-03Add NetBSD support to memsup and disksupAndrew Thompson
2011-04-01Add support for DragonFlyBSD to memsupAndrew Thompson
DragonFly was partially supported by os_mon already but when trying to start the os_mon application it'd crash with an error about an unknown operating system in memsup. This patch changes memsup to use the FreeBSD sysctl method to get memory information when on DragonFly.
2010-02-17Merge branch 'ks/cleanups' into ccase/r13b04_devErlang/OTP
* ks/cleanups: percept: Clean up as suggested by tidier percept: Modernize types and specs parsetools: Don't use 'try...of' when 'try' will do parsetools: Use %% for comments at the beginning of a line parsetools: Replace lists:keysearch/3 with lists:keyfind/3 parsetools: Modernize types and specs parsetools: Replace TABs with spaces runtime_tools: Modernize specs sasl: Eliminate tuple used as fun sasl: Add missing modules to app file asn1: Clean up as suggested by tidier os_mon: Modernize types and specs wx: Clean up as suggested by tidier OTP-8455 ks/cleanups
2010-02-16os_mon: Modernize types and specsKostis Sagonas
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP