aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon
AgeCommit message (Collapse)Author
2016-11-29warn_obsolete_guard is already defaultRichard Carlsson
Update compiler documentation and remove superfluous erlc flags.
2016-06-21Prepare releaseErlang/OTP
2016-06-14Merge branch 'lukas/erts/testfixes-19'Lukas Larsson
* lukas/erts/testfixes-19: erts: Increase bif and nif call_time trace test erts: Fix distribution_SUITE:bulk_send_bigbig on windows erts: Ensure bs_add_overflow test has enough memory kernel: Better explain controlling_process' tcp behaviour kernel: Fix t_recv_delim on bsd os_mon: Make sure to start/stop os_mon in tests correctly ssl: Fix use_interface dist_SSL test erl_interface: Fix signed int overflow tc bug erts: fix atom_roundtrip_r15b tc erts: Require more memory for debug tests
2016-06-14os_mon: Make sure to start/stop os_mon in tests correctlyLukas Larsson
2016-06-02Revert "Prepare release"Erlang/OTP
This reverts commit e020f75c10410a6943cd055bfa072a2641eab7da.
2016-06-02Prepare releaseErlang/OTP
2016-05-17os_mon: Fix compile error on FreeBSDSverker Eriksson
implicit declaration of function 'EXIT_WITH' Move code chunk up a bit to #define EXIT_WITH before it's used.
2016-05-17Merge branch 'jrobhoward/os_mon/fix-freebsd_get_os_wordsize/PR-1039/OTP-13601'Björn-Egil Dahlberg
* jrobhoward/os_mon/fix-freebsd_get_os_wordsize/PR-1039/OTP-13601: Fix memsup:get_os_wordsize() on 64-bit Linux PPC os_mon: Test wordsize of memsup:get_os_wordsize/0 Fix memsup:get_os_wordsize() on 64-bit FreeBSD
2016-05-16Fix memsup:get_os_wordsize() on 64-bit Linux PPCBjörn-Egil Dahlberg
2016-05-16os_mon: Test wordsize of memsup:get_os_wordsize/0Björn-Egil Dahlberg
Simple test against erlang:system_info({wordsize,external}).
2016-05-16Merge branch 'mururu/os_mon/cpu-sup-osx/PR-1049/OTP-13597'Björn-Egil Dahlberg
* mururu/os_mon/cpu-sup-osx/PR-1049/OTP-13597: os_mon: Implement cpu_sup:util/0,1 on OSX
2016-05-10os_mon: Fix unmatched return warningsBjörn-Egil Dahlberg
2016-05-06os_mon: Implement cpu_sup:util/0,1 on OSXYuki Ito
cpu_sup:util/0,1 works on OSX as well.
2016-05-04Fix compilation on SUN/SPARC by including <stdlib.h>Kostis Sagonas
The combination of the use of the exit() function without including <stdlib.h> together with the option -Werror=implicit-function-declaration causes the compilation (and the 'make') to fail on SUN/SPARC with gcc 4.9.3.
2016-04-29Fix memsup:get_os_wordsize() on 64-bit FreeBSDjrobhoward
2016-04-25Fix type spec for cpu_sup:util/1Péter Gömöri
The documentation correctly states that the Busy and NonBusy components in the return value of cpu_sup:util/1 are not tuples but list of tuples: "If the detailed option is given, this is a *list* of {State, Share} tuples"
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-01Don't crash in end_per_testcaseBjörn-Egil Dahlberg
2016-04-01Eliminate use of doc and suite clausesBjörn-Egil Dahlberg
Those clause are obsolete and never used by common_test.
2016-04-01Replace ?t:sleep/1 with ct:sleep/1Björn-Egil Dahlberg
2016-04-01Replace use of test_server:format/2 with io:format/2Björn-Egil Dahlberg
2016-04-01Eliminate use of test_server:fail/0,1Björn-Egil Dahlberg
2016-04-01Eliminate use of ?config() macroBjörn-Egil Dahlberg
2016-04-01Modernize use of timetrapsBjörn-Egil Dahlberg
2016-04-01Remove ?line macrosBjörn-Egil Dahlberg
2016-03-15update copyright-yearHenrik Nord
2016-02-17Makefiles: Remove test_server from include path and code pathBjörn Gustavsson
Since no test suites includede test_server.hrl, there is no need to have test_server in the include path or code path.
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2015-10-13Small misprintKirill Zaborsky
2015-06-23Prepare releaseErlang/OTP
2015-06-18Change license text to APLv2Bruce Yinhe
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-06-02os_mon: Comply with C89 standardBjörn-Egil Dahlberg
2015-05-29Merge branch 'ethercrow/maint'Zandra Hird
* ethercrow/maint: Make cpu_sup:util/0 spec lie less
2015-05-27Update application versionsHans Bolinder
2015-05-26os_mon: Update docs for FreeBSDWasif Malik and Johannes Huning
Authors: Wasif Malik and Johannes Huning
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-13Revert "Prepare release"Henrik Nord
This reverts commit e09dd66dc4d89c62ddfd8c19791f9678d5d787c6.
2015-05-12Prepare releaseErlang/OTP
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-31Prepare releaseErlang/OTP
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: rename send() to sendi() in cpu_sup.cAlex Wilson
Without this, cpu_sup.c won't compile on FreeBSD, as the name overlaps with the send() socket call.
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-12-11Fix compile breakage on OpenBSDAlex Wilson
Some of the structs and functions needed by memsup.c are in vmmeter.h on OpenBSD, too.
2014-09-15Update release notesErlang/OTP
2014-09-15Update version numbersErlang/OTP
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: Fix so that all testcases are runLukas Larsson
For some reason only a new testcases were run on the majority of platforms. After this change all tests are run on all unix and win32 platforms.