Symbian3/PDK/Source/GUID-8BC13552-7C7D-52AC-AF91-1BB7476912AF.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 15:24:34 +0100
changeset 9 59758314f811
parent 5 f345bda72bc4
child 12 80ef3a206772
permissions -rw-r--r--
Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     6
<!-- Initial Contributors:
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     7
    Nokia Corporation - initial contribution.
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     8
Contributors: 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     9
-->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    10
<!DOCTYPE concept
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    12
<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>
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    13
             System Health Manager Architecture 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    14
          </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
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    15
                Concepts</linktext> </link> <link href="GUID-723F8716-1FDD-57B4-B685-672D3A755592.dita"><linktext>Requesting and cancelling
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    16
                monitoring for a process</linktext> </link> </related-links></concept>