<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2014</year><year>2016</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
 
          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    
    </legalnotice>

    <title></title>
    <prepared></prepared>
    <responsible></responsible>
    <docno>1</docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev></rev>
    <file>system_information.xml</file>
  </header>
  <module since="OTP 17.0">system_information</module>
  <modulesummary>System Information</modulesummary>
  <description>
    <p></p>
  </description>
  <funcs>
    <func>
      <name name="sanity_check" arity="0" since="OTP 17.0"/>
      <fsummary>Perform a sanity check</fsummary>
      <desc>
        <p>Performs a sanity check on the system. If no issues
	were found, <c>ok</c> is returned. If issues were
	found, <c>{failed, <anno>Failures</anno>}</c> is
	returned. All failures found will be part of the
	<c><anno>Failures</anno></c> list. Currently defined
	<c><anno>Failure</anno></c> elements in the
	<c><anno>Failures</anno></c> list:</p>
	<taglist>
	  <tag><c><anno>InvalidAppFile</anno></c></tag>
	  <item><p>An application has an invalid <c>.app</c> file. The
	  second element identifies the application which has the
	  invalid <c>.app</c> file.</p></item>
	  <tag><c><anno>InvalidApplicationVersion</anno></c></tag>
	  <item><p>An application has an invalid application version.
	  The second element identifies the application version that
	  is invalid.</p></item>
	  <tag><c><anno>MissingRuntimeDependencies</anno></c></tag>
	  <item><p>An application is missing
	  <seefile marker="kernel:app#runtime_dependencies">runtime
	  dependencies</seefile>. The second element identifies the
	  application (with version) that has missing dependencies.
	  The third element contains the missing dependencies.</p>
	  <p>Note that this check use application versions that
	  are loaded, or will be loaded when used. You might have
	  application versions that satisfies all dependencies
	  installed in the system, but if those are not loaded this
	  check will fail. The system will of course also fail when
	  used like this. This may happen when you have multiple 
	  <seeguide marker="system/system_principles:versions">branched
	  versions</seeguide> of the same application installed in the
	  system, but you do not use a
	  <seeguide marker="system/system_principles:system_principles#BOOTSCRIPT">boot
	  script</seeguide> identifing the correct application version.</p>
	  </item>
	</taglist>
	<p>Currently the sanity check is limited to verifying
	runtime dependencies found in the <c>.app</c> files of
	all applications. More checks will be introduced in the
	future. This implies that the return type <em>will</em>
	change in the future.</p>
	<note><p>An <c>ok</c> return value only means that
	<c>sanity_check/0</c> did not find any issues, <em>not</em>
	that no issues exist.</p></note>
      </desc>
    </func>
    <func>
      <name name="to_file" arity="1" since="OTP 17.0"/>
      <fsummary>Write miscellaneous system information to file</fsummary>
      <desc><p>Writes  miscellaneous system information to file. This
      information will typically be requested by the Erlang/OTP team
      at Ericsson AB when reporting an issue.</p></desc>
    </func>
  </funcs>
 </erlref>

