diff options
Diffstat (limited to 'lib/os_mon')
-rw-r--r-- | lib/os_mon/c_src/memsup.c | 8 | ||||
-rw-r--r-- | lib/os_mon/doc/src/book.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/cpu_sup.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/disksup.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/fascicules.xml | 2 | ||||
-rw-r--r-- | lib/os_mon/doc/src/memsup.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/notes.xml | 44 | ||||
-rw-r--r-- | lib/os_mon/doc/src/nteventlog.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/os_mon_app.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/os_mon_mib.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/os_sup.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/part_notes.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/doc/src/ref_man.xml | 4 | ||||
-rw-r--r-- | lib/os_mon/src/nteventlog.erl | 6 | ||||
-rw-r--r-- | lib/os_mon/src/os_mon.app.src | 5 | ||||
-rw-r--r-- | lib/os_mon/src/os_mon.appup.src | 27 | ||||
-rw-r--r-- | lib/os_mon/src/os_sup.erl | 6 | ||||
-rw-r--r-- | lib/os_mon/test/cpu_sup_SUITE.erl | 6 | ||||
-rw-r--r-- | lib/os_mon/test/disksup_SUITE.erl | 17 | ||||
-rw-r--r-- | lib/os_mon/test/os_mon_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/os_mon/vsn.mk | 2 |
21 files changed, 103 insertions, 69 deletions
diff --git a/lib/os_mon/c_src/memsup.c b/lib/os_mon/c_src/memsup.c index b5114d10ed..409db84aa7 100644 --- a/lib/os_mon/c_src/memsup.c +++ b/lib/os_mon/c_src/memsup.c @@ -324,7 +324,7 @@ get_mem_procfs(memory_ext *me){ /* arch specific functions */ -#if defined(__linux__) /* ifdef SYSINFO */ +#if defined(__linux__) && !defined(__ANDROID__)/* ifdef SYSINFO */ /* sysinfo does not include cached memory which is a problem. */ static int get_extended_mem_sysinfo(memory_ext *me) { @@ -395,8 +395,12 @@ get_extended_mem_sgi(memory_ext *me) { static void get_extended_mem(memory_ext *me) { +/* android */ +#if defined(__ANDROID__) + if (get_mem_procfs(me)) return; + /* linux */ -#if defined(__linux__) +#elif defined(__linux__) if (get_mem_procfs(me)) return; if (get_extended_mem_sysinfo(me)) return; diff --git a/lib/os_mon/doc/src/book.xml b/lib/os_mon/doc/src/book.xml index 17645b81fd..1b927fc9ac 100644 --- a/lib/os_mon/doc/src/book.xml +++ b/lib/os_mon/doc/src/book.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE book SYSTEM "book.dtd"> <book xmlns:xi="http://www.w3.org/2001/XInclude"> <header titlestyle="normal"> <copyright> - <year>1997</year><year>2009</year> + <year>1997</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/cpu_sup.xml b/lib/os_mon/doc/src/cpu_sup.xml index 7b28083fbc..59da876208 100644 --- a/lib/os_mon/doc/src/cpu_sup.xml +++ b/lib/os_mon/doc/src/cpu_sup.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1997</year><year>2009</year> + <year>1997</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/disksup.xml b/lib/os_mon/doc/src/disksup.xml index bfa3d3578f..dbcfd65095 100644 --- a/lib/os_mon/doc/src/disksup.xml +++ b/lib/os_mon/doc/src/disksup.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/fascicules.xml b/lib/os_mon/doc/src/fascicules.xml index 43090b4aed..fadd37eefb 100644 --- a/lib/os_mon/doc/src/fascicules.xml +++ b/lib/os_mon/doc/src/fascicules.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE fascicules SYSTEM "fascicules.dtd"> <fascicules> diff --git a/lib/os_mon/doc/src/memsup.xml b/lib/os_mon/doc/src/memsup.xml index 67d617375e..62f77ea12f 100644 --- a/lib/os_mon/doc/src/memsup.xml +++ b/lib/os_mon/doc/src/memsup.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/notes.xml b/lib/os_mon/doc/src/notes.xml index db386979c0..5ac04d4f42 100644 --- a/lib/os_mon/doc/src/notes.xml +++ b/lib/os_mon/doc/src/notes.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> @@ -30,6 +30,48 @@ </header> <p>This document describes the changes made to the OS_Mon application.</p> +<section><title>Os_Mon 2.2.15</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Application upgrade (appup) files are corrected for the + following applications: </p> + <p> + <c>asn1, common_test, compiler, crypto, debugger, + dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe, + inets, observer, odbc, os_mon, otp_mibs, parsetools, + percept, public_key, reltool, runtime_tools, ssh, + syntax_tools, test_server, tools, typer, webtool, wx, + xmerl</c></p> + <p> + A new test utility for testing appup files is added to + test_server. This is now used by most applications in + OTP.</p> + <p> + (Thanks to Tobias Schlager)</p> + <p> + Own Id: OTP-11744</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Calls to erlang:open_port/2 with 'spawn' are updated to + handle space in the command path.</p> + <p> + Own Id: OTP-10842</p> + </item> + </list> + </section> + +</section> + <section><title>Os_Mon 2.2.14</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/os_mon/doc/src/nteventlog.xml b/lib/os_mon/doc/src/nteventlog.xml index 1e3fad90cd..8b27092f85 100644 --- a/lib/os_mon/doc/src/nteventlog.xml +++ b/lib/os_mon/doc/src/nteventlog.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1998</year><year>2009</year> + <year>1998</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/os_mon_app.xml b/lib/os_mon/doc/src/os_mon_app.xml index 8b44b70c5f..f6bb2300bb 100644 --- a/lib/os_mon/doc/src/os_mon_app.xml +++ b/lib/os_mon/doc/src/os_mon_app.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE appref SYSTEM "appref.dtd"> <appref> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/os_mon_mib.xml b/lib/os_mon/doc/src/os_mon_mib.xml index 220d6a4a22..fa183086ff 100644 --- a/lib/os_mon/doc/src/os_mon_mib.xml +++ b/lib/os_mon/doc/src/os_mon_mib.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2004</year><year>2009</year> + <year>2004</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/os_sup.xml b/lib/os_mon/doc/src/os_sup.xml index 792d18ba14..fb162c15a7 100644 --- a/lib/os_mon/doc/src/os_sup.xml +++ b/lib/os_mon/doc/src/os_sup.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/part_notes.xml b/lib/os_mon/doc/src/part_notes.xml index 8fe226f53e..0969fb9136 100644 --- a/lib/os_mon/doc/src/part_notes.xml +++ b/lib/os_mon/doc/src/part_notes.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE part SYSTEM "part.dtd"> <part xmlns:xi="http://www.w3.org/2001/XInclude"> <header> <copyright> - <year>2004</year><year>2009</year> + <year>2004</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/doc/src/ref_man.xml b/lib/os_mon/doc/src/ref_man.xml index 5a50c122fd..10c0fef52c 100644 --- a/lib/os_mon/doc/src/ref_man.xml +++ b/lib/os_mon/doc/src/ref_man.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE application SYSTEM "application.dtd"> <application xmlns:xi="http://www.w3.org/2001/XInclude"> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/os_mon/src/nteventlog.erl b/lib/os_mon/src/nteventlog.erl index d624048c29..97eaf07179 100644 --- a/lib/os_mon/src/nteventlog.erl +++ b/lib/os_mon/src/nteventlog.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -122,8 +122,8 @@ code_change(_OldVsn, State, _Extra) -> start_portprogram(Identifier) -> Command = - filename:join([code:priv_dir(os_mon),"bin","nteventlog.exe"]) ++ - " " ++ make_list(Identifier), + "\"" ++ filename:join([code:priv_dir(os_mon),"bin","nteventlog.exe"]) ++ + "\" " ++ make_list(Identifier), open_port({spawn,Command},[{packet,2}]). make_list(X) when is_atom(X) -> diff --git a/lib/os_mon/src/os_mon.app.src b/lib/os_mon/src/os_mon.app.src index 15bbd2663c..cc08cebe3d 100644 --- a/lib/os_mon/src/os_mon.app.src +++ b/lib/os_mon/src/os_mon.app.src @@ -29,4 +29,7 @@ {start_disksup, true}, {start_memsup, true}, {start_os_sup, false}]}, - {mod, {os_mon, []}}]}. + {mod, {os_mon, []}}, + {runtime_dependencies, ["stdlib-2.0","snmp-4.25.1","sasl-2.4", + "otp_mibs-1.0.9","mnesia-4.12","kernel-3.0", + "erts-6.0"]}]}. diff --git a/lib/os_mon/src/os_mon.appup.src b/lib/os_mon/src/os_mon.appup.src index f8e09a7d87..480f5d9511 100644 --- a/lib/os_mon/src/os_mon.appup.src +++ b/lib/os_mon/src/os_mon.appup.src @@ -1,7 +1,7 @@ -%% +%% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -16,26 +16,7 @@ %% %% %CopyrightEnd% %% - {"%VSN%", - [ - {"2.1", - [{load_module, cpu_sup}, - {load_module, disksup}, - {load_module, memsup}, - {load_module, os_mon}, - {load_module, os_mon_mib}]}, - {"2.1.1", - [{load_module, os_mon_mib}]} - ], - [ - {"2.1", - [{load_module, cpu_sup}, - {load_module, disksup}, - {load_module, memsup}, - {load_module, os_mon}, - {load_module, os_mon_mib}]}, - {"2.1.1", - [{load_module, os_mon_mib}]} - ] + [{<<".*">>,[{restart_application, os_mon}]}], + [{<<".*">>,[{restart_application, os_mon}]}] }. diff --git a/lib/os_mon/src/os_sup.erl b/lib/os_mon/src/os_sup.erl index f5c6c138ba..3ad8b6e990 100644 --- a/lib/os_mon/src/os_sup.erl +++ b/lib/os_mon/src/os_sup.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -228,8 +228,8 @@ code_change(_OldVsn, State, _Extra) -> start_portprogram() -> OwnPath = os_mon:get_env(os_sup, os_sup_own), Command = - filename:join([code:priv_dir(os_mon), "bin", "ferrule"]) ++ - " " ++ OwnPath, + "\"" ++ filename:join([code:priv_dir(os_mon), "bin", "ferrule"]) ++ + "\" " ++ OwnPath, open_port({spawn, Command}, [{packet, 2}]). %% os:cmd(cmd_str(enable)) should be done BEFORE starting os_sup diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl index e0382cb0c7..9f58e043db 100644 --- a/lib/os_mon/test/cpu_sup_SUITE.erl +++ b/lib/os_mon/test/cpu_sup_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2011. All Rights Reserved. +%% Copyright Ericsson AB 2002-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -257,8 +257,8 @@ port(Config) when is_list(Config) -> terminate(suite) -> []; terminate(Config) when is_list(Config) -> - ?line ok = application:set_env(os_mon, start_cpu_sup, false), - ?line ok = supervisor:terminate_child(os_mon_sup, cpu_sup), + ok = application:set_env(os_mon, start_cpu_sup, false), + _ = supervisor:terminate_child(os_mon_sup, cpu_sup), ok. unavailable(suite) -> diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl index 9c65d8b692..94661cfa77 100644 --- a/lib/os_mon/test/disksup_SUITE.erl +++ b/lib/os_mon/test/disksup_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2011. All Rights Reserved. +%% Copyright Ericsson AB 1996-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -350,15 +350,16 @@ otp_5910(doc) -> otp_5910(Config) when is_list(Config) -> %% Make sure disksup sets at least one alarm - Data = disksup:get_disk_data(), + Data = lists:sort(disksup:get_disk_data()), Threshold0 = disksup:get_almost_full_threshold(), Threshold = case over_threshold(Data, Threshold0) of - 0 -> - [{_Id,_Kbyte,Cap}|_] = Data, - ok = disksup:set_almost_full_threshold((Cap-1)/100), - Cap-1; - _N -> Threshold0 - end, + 0 -> + [{_Id,_Kbyte,Cap}|_] = Data, + io:format("Data ~p Threshold ~p ~n",[Data, Cap-1]), + ok = disksup:set_almost_full_threshold((Cap-1)/100), + Cap-1; + _N -> Threshold0 + end, ok = application:set_env(os_mon, disk_almost_full_threshold, Threshold/100), disksup ! timeout, % force a disk check Data2 = disksup:get_disk_data(), diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl index f074657d4c..08ad8436dd 100644 --- a/lib/os_mon/test/os_mon_SUITE.erl +++ b/lib/os_mon/test/os_mon_SUITE.erl @@ -25,7 +25,7 @@ -export([init_per_testcase/2, end_per_testcase/2]). %% Test cases --export([app_file/1, config/1]). +-export([app_file/1, appup_file/1, config/1]). %% Default timetrap timeout (set in init_per_testcase) -define(default_timeout, ?t:minutes(1)). @@ -43,8 +43,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> case test_server:os_type() of - {unix, sunos} -> [app_file, config]; - _OS -> [app_file] + {unix, sunos} -> [app_file, appup_file, config]; + _OS -> [app_file, appup_file] end. groups() -> @@ -71,6 +71,9 @@ app_file(Config) when is_list(Config) -> ?line ok = test_server:app_test(os_mon), ok. +appup_file(Config) when is_list(Config) -> + ok = test_server:appup_test(os_mon). + config(suite) -> []; config(doc) -> diff --git a/lib/os_mon/vsn.mk b/lib/os_mon/vsn.mk index e9e90729f2..74397c2bc6 100644 --- a/lib/os_mon/vsn.mk +++ b/lib/os_mon/vsn.mk @@ -1 +1 @@ -OS_MON_VSN = 2.2.14 +OS_MON_VSN = 2.2.15 |