Symbian3/PDK/Source/GUID-8BC13552-7C7D-52AC-AF91-1BB7476912AF.dita
changeset 12 80ef3a206772
parent 9 59758314f811
child 14 578be2adaf3e
--- a/Symbian3/PDK/Source/GUID-8BC13552-7C7D-52AC-AF91-1BB7476912AF.dita	Fri Jul 02 12:51:36 2010 +0100
+++ b/Symbian3/PDK/Source/GUID-8BC13552-7C7D-52AC-AF91-1BB7476912AF.dita	Fri Jul 16 17:23:46 2010 +0100
@@ -11,6 +11,6 @@
   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
 <concept xml:lang="en" id="GUID-8BC13552-7C7D-52AC-AF91-1BB7476912AF"><title>System Health Manager Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The System Health Manager (SHMA) was previously known as the System Monitor (SysMon). It monitors running processes (system servers) and attempts to restart them if they fail unexpectedly. It may restart the device if it is unable to restart the process. </p> <p>A application may use the SysMon API to request monitoring for itself or other applications. Only an application with <codeph>ProtServ</codeph> capability, however, may request that the device be restarted. </p> <section><title>Purpose</title> <p>Certain applications and background process are essential for the device or for certain applications to function correctly. The System Health Manager ensures that the device remains completely functional by restarting applications or processes, or the device itself, if they stop unexpectedly. </p> </section> <section><title>Background</title> <p>SHMA uses System State Manager (SSM) for process monitoring. SSM provides the required information such as number of restart attempts that can be made, start-up modes and properties. See <xref href="GUID-788BD091-186A-5E25-B058-952C7629A8D4.dita">System State Manager</xref>. </p> </section> <section><title>Key concepts and terms</title> <dl><dlentry><dt>Relaunch policy</dt> <dd><p>Specifies the behaviour when a process fails unexpectedly. See <xref href="GUID-484B27EF-3FA1-5193-97EC-B9699AE49026.dita#GUID-484B27EF-3FA1-5193-97EC-B9699AE49026/GUID-30C01801-01F4-5C20-9CA0-910498D47982">Relaunch policy</xref>. </p> </dd> </dlentry> <dlentry><dt>Retry Failure policy</dt> <dd><p>Specifies the behaviour when a failed process fails to restart. See <xref href="GUID-484B27EF-3FA1-5193-97EC-B9699AE49026.dita#GUID-484B27EF-3FA1-5193-97EC-B9699AE49026/GUID-6A9855C6-0D0E-5D4F-9042-5BA34F3E002C">Retry Failure policy</xref>. </p> </dd> </dlentry> </dl> </section> <section><title>Architecture</title> <p>The SHMA is simple and self explanatory. A client must instantiate an <codeph>RSysMonSession</codeph> to open a session for monitoring. </p> <p>Monitoring is started with a call to <codeph>RSysMonSession::MonitorL()</codeph> or <codeph>RSysMonSession::MonitorSelfL()</codeph>. Before calling one of these functions, however, the client must create and populate a <xref href="GUID-99C4720B-9441-38E0-BBFA-BBCB845BD642.dita"><apiname>CSsmStartupProperties</apiname></xref> object containing the required monitoring and restart configurations. <xref href="GUID-99C4720B-9441-38E0-BBFA-BBCB845BD642.dita"><apiname>CSsmStartupProperties</apiname></xref> has a series of <codeph>Set...()</codeph> functions which are used to determine the monitoring and restart behaviour for the process to be monitored. </p> <fig id="GUID-67305BB8-6D0E-5957-96D0-A880CCDC8626"><title>
              System Health Manager Architecture 
-          </title> <image href="GUID-C02F7A8B-E6D1-5DB5-A3CA-08875A196199_d0e159505_href.png" placement="inline"/></fig> <p>Process monitoring can also be set up using a resource file. <xref href="GUID-0ABC00DB-068B-3757-855B-0849259F7793.dita"><apiname>CResourceFile</apiname></xref> accesses a resource file and reads the resource data into a buffer and the data is interpreted using <xref href="GUID-E468FC5F-0392-3385-887A-C5AB0E0009CC.dita"><apiname>RResourceReader</apiname></xref> class. </p> <p>Process monitoring is normally configured for processes using <codeph>SSM_START_PROCESS_INFO</codeph> and <codeph>SSM_START_APP_INFO</codeph> resources in a static command list. These are defined in <codeph>ssmcmd.rh</codeph>. Note that these structures add monitor, startup mode and a localisable error message to <codeph>SSM_START_PROCESS_INFO</codeph> and <codeph>SSM_START_APP_INFO</codeph>. See <xref href="GUID-723F8716-1FDD-57B4-B685-672D3A755592.dita#GUID-723F8716-1FDD-57B4-B685-672D3A755592/GUID-91438FCA-D06F-5779-98E9-D353692BE59F">Examples</xref>. </p> </section> <section><title>APIs</title> <p>SysMon API has the following classes: </p> <table id="GUID-F27E311B-0F1C-5E00-AB55-A0A22483B5A1"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>Class</entry> <entry>Description</entry> </row> </thead> <tbody><row><entry><p> <xref href="GUID-19467402-8575-33F0-817D-339D39982D39.dita"><apiname>RSysMonSession</apiname></xref>  </p> </entry> <entry><p>Client-side SysMon session API </p> </entry> </row> <row><entry><p> <xref href="GUID-99C4720B-9441-38E0-BBFA-BBCB845BD642.dita"><apiname>CSsmStartupProperties</apiname></xref>  </p> </entry> <entry><p>Contains process starter information. </p> </entry> </row> <row><entry><p> <xref href="GUID-C6E2A0AA-01AA-3648-BE3B-6CF2A641294B.dita"><apiname>TSsmMonitorInfo</apiname></xref>  </p> </entry> <entry><p>Convenience class combining restart property information. </p> </entry> </row> </tbody> </tgroup> </table> </section> <section><title>Typical uses</title> <p>System Health Manager is used for requesting and cancelling monitoring for a process. </p> </section> </conbody><related-links><link href="GUID-484B27EF-3FA1-5193-97EC-B9699AE49026.dita"><linktext>System Health Manager
+          </title> <image href="GUID-C02F7A8B-E6D1-5DB5-A3CA-08875A196199_d0e165606_href.png" placement="inline"/></fig> <p>Process monitoring can also be set up using a resource file. <xref href="GUID-0ABC00DB-068B-3757-855B-0849259F7793.dita"><apiname>CResourceFile</apiname></xref> accesses a resource file and reads the resource data into a buffer and the data is interpreted using <xref href="GUID-E468FC5F-0392-3385-887A-C5AB0E0009CC.dita"><apiname>RResourceReader</apiname></xref> class. </p> <p>Process monitoring is normally configured for processes using <codeph>SSM_START_PROCESS_INFO</codeph> and <codeph>SSM_START_APP_INFO</codeph> resources in a static command list. These are defined in <codeph>ssmcmd.rh</codeph>. Note that these structures add monitor, startup mode and a localisable error message to <codeph>SSM_START_PROCESS_INFO</codeph> and <codeph>SSM_START_APP_INFO</codeph>. See <xref href="GUID-723F8716-1FDD-57B4-B685-672D3A755592.dita#GUID-723F8716-1FDD-57B4-B685-672D3A755592/GUID-91438FCA-D06F-5779-98E9-D353692BE59F">Examples</xref>. </p> </section> <section><title>APIs</title> <p>SysMon API has the following classes: </p> <table id="GUID-F27E311B-0F1C-5E00-AB55-A0A22483B5A1"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>Class</entry> <entry>Description</entry> </row> </thead> <tbody><row><entry><p> <xref href="GUID-19467402-8575-33F0-817D-339D39982D39.dita"><apiname>RSysMonSession</apiname></xref>  </p> </entry> <entry><p>Client-side SysMon session API </p> </entry> </row> <row><entry><p> <xref href="GUID-99C4720B-9441-38E0-BBFA-BBCB845BD642.dita"><apiname>CSsmStartupProperties</apiname></xref>  </p> </entry> <entry><p>Contains process starter information. </p> </entry> </row> <row><entry><p> <xref href="GUID-C6E2A0AA-01AA-3648-BE3B-6CF2A641294B.dita"><apiname>TSsmMonitorInfo</apiname></xref>  </p> </entry> <entry><p>Convenience class combining restart property information. </p> </entry> </row> </tbody> </tgroup> </table> </section> <section><title>Typical uses</title> <p>System Health Manager is used for requesting and cancelling monitoring for a process. </p> </section> </conbody><related-links><link href="GUID-484B27EF-3FA1-5193-97EC-B9699AE49026.dita"><linktext>System Health Manager
                 Concepts</linktext> </link> <link href="GUID-723F8716-1FDD-57B4-B685-672D3A755592.dita"><linktext>Requesting and cancelling
                 monitoring for a process</linktext> </link> </related-links></concept>
\ No newline at end of file