Microsoft System Center Configuration Manager 2007 logging for mobile devices allows administrators to evaluate and troubleshoot mobile device management activities on the mobile device and on the server. The logging capabilities for mobile devices have been significantly enhanced in Configuration Manager 2007. Configuration Manager 2007 now includes the ability to read device client logs using SMSTrace.exe and the ability to configure the level of detail of logging on mobile devices using the logging framework. The mobile device client logging framework is configured via registry settings on the mobile device. There are three levels of scope where settings can be configured:
- Component
- Global
- Default
Settings Scope
Each process that can be logged specifies a component name. If logging settings are specified at the component scope, that scope is used if the component scope exists. If no logging settings exist at the component scope, the logging settings declared at the global scope are used. If no settings exist at the global scope, the default settings defined in the logging framework are used.
Logging settings at the global scope are stored under
the following registry key:
HKLM\Comm\ApplicationDownload\Logging
.
Logging settings at the component scope are stored
under a subkey of the global key. The name of the subkey is the
name of the component, as in the following example:
HKLM\Comm\ApplicationDownload\Logging\
<ComponentName>.
For example, if the process calls "Component1" as the component
name, the process of that component can be controlled via settings
under the following key:
HKLM\Comm\ApplicationDownload\Logging\Component1
.
Minimum and Maximum Values
Some logging settings have minimum and maximum values defined in the framework. This ensures that a user cannot set a value in the registry that would have detrimental effects on the mobile device or that will be too low to collect meaningful information.
If a registry setting value is below the minimum allowed, the minimum value is used. If a registry setting value is above the maximum allowed, the maximum value is used.
Settings
The following table lists the available logging settings. These settings can exist on both global and component registry keys. The Setting Name is the name of the registry value under the key.
Setting Name | Type | Min. Value | Max. Value | Default Value | Description |
---|---|---|---|---|---|
LogDirectory |
REG_SZ |
N/A |
N/A |
"\Temp\DMClientLogs" On Windows Mobile Smartphone 2003 this is redirected to \Storage\temp\DMClientLogs |
Directory where log files are created. |
MaxLogSizeBytes |
DWORD |
1024 (1K) |
1048576 (1 Meg) |
32K |
Maximum size of log files, in bytes, for the component before the file rolls over. |
MaxLogCount |
DWORD |
2 |
24 |
5 |
Maximum number of log files for the component. If the number of files exceeds this limit, the oldest files will be deleted. |
LogLevel |
DWORD |
0 (VERBOSE) |
3 (ERROR) |
3 (ERROR) |
Specifies the minimum type of a log statement that will be written to the log. If a log statement falls below this setting, the log statement will be ignored. Specifying anything higher than 3 (ERROR) will prevent all statements from being written to the log file. (This essentially disables logging.) |
The logging framework does not detect changes to settings on the fly. Settings are read when the client service starts. For the updated settings to be applied, the device management service must be restarted after changes are made. This can be done in the Device Management Control Panel.
Log Files for Mobile Device Client Installation
As mobile device client installation progresses on the mobile device, log files are generated on the mobile device. The log files can be used to confirm that the installation was completed. After a successful client installation, the following log files can be found on the mobile device:
- DMInstaller[date:time].log
- DMClientSetup[date:time].log
- DMSvc[date:time].log
Naming
The logging framework manages a set of log files for each component. When the logging process is called, it either creates a new log file or opens an existing one for the component. The log file is written to until it rolls over as described below. Every log file name has the following format:
<ComponentName>-<DateStamp>-<TimeStamp>.log
- <ComponentName> is the name of
the component passed into the InitLogger function.
- <DateStamp> is the date when the
log file was created, in YYYYMMHH format.
- <TimeStamp> is the UTC time when
the log file was created, in hhmmss format.
For example, if the component name is "Component1" and the log file was created on June 13, 2006 at 1:05pm UTC, the log file name would be Component1-20060613-130500.log.
Rollover
When a log file exceeds the MaxLogSizeBytes setting, it is "rolled over," meaning the log file is closed and a new one is created. When the total number of log files for the component (currently opened plus rolled-over log files) exceeds the MaxLogCount setting, the oldest file is deleted.
Format
The logging framework writes log entries in a format that is readable by the SMS Trace (smstrace.exe) log viewer. Each entry has the following items:
- Log text Log text emitted by logging
macros (VERBOSE, INFO, WARN, ERROR)
- Time stamp (Local Time)
- Date stamp (Local Time)
- Log Type–-0 for Verbose, 1 for Info, 2
for Warn, 3 for Error
- Thread
- Source file
Enabling Logging Levels
Use the following guidelines to determine which logging level should be used:
- Verbose: Use Verbose log statements only for
statements that aid support personnel and Microsoft Support
Services in troubleshooting problems on the mobile device. Verbose
logging provides detailed information. Examples of data logged
under Verbose logging include: tracing function entry/exit,
parameters passed to functions, and so on. VERBOSE log statements
are written to the log file if the LogLevel is 0.
Note |
---|
Use verbose logging with discretion. If used with incorrect settings, it can overload the mobile device with log files. |
- Info: Use Info log statements for statements
that notify the end user or support personnel of non-error events
related to functional aspects of the mobile device. Examples
include the beginning and ending of functional behavior--for
example, "Downloading Package" or "Package Download Succeeded".
INFO log statements are written to the log file if the LogLevel
setting is 1 or lower.
- Warn: Use Warn log statements to notify the
user of an error condition that is handled and does not indicate a
failure in the function of the mobile device but that might be
helpful for further investigation. WARN log statements are written
to file only if the LogLevel setting is 2 or lower.
- Error: Use Error log statements to notify the
user of an error condition that indicates a failure in a functional
aspect of the product--for example, "Package Download Failed" or
"Package Hash Verification Failed." ERROR log statements are always
written to the log file.
Verbose logging can be enabled using the DMCommonInstaller.ini or ClientSettins.ini file during setup or upgrade by setting the value EnableVerboseLogging=True. This enables verbose logging on any client installed or updated using this DMCommonInstaller.ini or ClientSettings.ini file. Verbose logging or any logging level can be enabled on specific mobile devices managed by Microsoft System Center Configuration Manager 2007 by using the Registry Configuration Item to deploy the necessary registry keys and values from the table shown earlier. Log settings can also be modified using a configuration item registry setting distributed with a configuration package. Changes to logging settings will not take effect until the mobile device client is restarted. This can be done by performing a soft reset of the mobile device.
Note |
---|
Using the Verbose logging level is not recommended, except at the direction of Microsoft support personnel. The data provided by verbose logging is of little value to enterprise support personnel. |
Example Logging Configuration Documents
Because logging settings are stored in the registry, the Registry Configuration Service Provider (CSP) can be used to query or set logging settings on the mobile device.
Querying Logging Settings
The following CSP example shows how to query the global logging settings on a device:
Copy Code | |
---|---|
<wap-provisioningdoc> <characteristic type="Registry"> <characteristic type="HKLM\Comm\ApplicationDownload\Logging"> <parm-query name="LogDirectory"/> <parm-query name="MaxLogSizeBytes"/> <parm-query name="MaxLogCount"/> <parm-query name="LogLevel"/> </characteristic> </characteristic> </wap-provisioningdoc> |
Setting Logging Settings
The following CSP example shows how to set global logging settings on the device:
Copy Code | |
---|---|
<wap-provisioningdoc> <characteristic type="Registry"> <characteristic type="HKLM\Comm\ApplicationDownload\Logging"> <parm name="LogDirectory" value="\Temp\Logs" datatype="string"/> <parm name="MaxLogSizeBytes" value="7000" datatype="integer"/> <parm name="MaxLogCount" value="7" datatype="integer"/> <parm name="LogLevel" value="0" datatype="integer"/> </characteristic> </characteristic> </wap-provisioningdoc> |
Log file locations
Mobile device client log files are found in the following locations:
- Mobile Device Center or ActiveSync
Configuration Manager 2007 computer clients
- Windows CE and Windows Mobile Pocket PC
devices
- Windows Mobile 5 Smartphone and Windows
Mobile 6 Standard devices
- Windows Mobile 2003 Smartphone
devices
Location Path Log Files On an ActiveSync or Mobile Device Center Configuration Manager 2007 managed desktop
%temp%\SmsDm in the user temp folder
DmClientXfer.log
DmCommonInstaller.log
DmInvExtension.log
On all Windows CE, Windows Mobile Pocket PC, and Windows Mobile 6 Professional devices
\temp\DmClientLogs
DmCertEnroll...log
DmClientSetup…log
DmInstaller…log
DmSvc…log
DMCertResp.htm (in \temp)
On Windows Mobile Smartphone 5 and Windows Mobile 6 Standard devices
\ Temp\DmClientLogs in the mobile device storage folder or \temp\DMClientLogs in the mobile device file system
DmCertEnroll...log
DmClientSetup…log
DmInstaller…log
DmSvc…log
DMCertResp.htm
On Windows Mobile Smartphone 2003 devices
\Storage\temp\DMClientLogs
DmCertEnroll...log
DmClientSetup…log
DmInstaller…log
DmSvc…log
DMCertResp.htm
On a device management site server with no Configuration Manager 2007 client installed
<InstallationFolder> \ CCM \ Logs
DmClientHealth.log
DmClientRegistration.log
DmpDatastore.log
DmpDiscovery.log
DmpFileCollection.log
DmpHardware.log
DmpIsapi.log
DmpSoftware.log
DmpStatus.log
FspIsapi.log
<InstallationFolder> \Logs
DmpMSI.log
DmpSetup.log
Fspmgr.log
fspMSI.log
\%windir%\System32\Logfiles\W3SVC1
Any IIS logs (named by date and time)
On site servers with Configuration Manager 2007 client installed
The Configuration Manager 2007 directory is installed in \%windir%\System32\CCM instead.
DmClientHealth.log
DmClientRegistration.log
DmpDatastore.log
DmpDiscovery.log
DmpFileCollection.log
DmpHardware.log
DmpIsapi.log
DmpSoftware.log
DmpStatus.log
FspIsapi.log