See all of the top support solutions for our most common issues here
As the first post in the Configuration Manager OSD Support Team Blog, I am going to go over something that affects us a lot in CSS - increasing the size of the SMSTS.log and specifying how many times it rolls over. Many times when troubleshooting customer issues with a Task Sequence, we discover that the logs have rolled over and that we have lost the logging and history of what happened when the issue actually occurred. Without these logs and history it makes it very difficult to determine what the problem is.
Luckily both the SMSTS.log size and the amount of time it rolls over can be changed. The tricky part though is that you may need to make this change in up to three different areas.
Here are two quick tips regarding the below article:
How To Change Logging Options For SMSTS.log in System Center Configuration Manager 2007
When deploying a Task Sequence, there may be times that the options of the SMSTS.log file need to be changed, such as increasing the size of the log or the amount of historical logs (rolled over logs) that are created. If the SMSTS.log size is not increased or the amount of historical logs is not increased, information about what happened during the Task Sequence may be lost. In troubleshooting scenarios this may make it difficult to determine what is causing problems.
The Task Sequence has the potential of running in three different Windows OSes before it completes:
Because of this, if options for the SMSTS.log file need to be changed, they may need to be changed each time the Windows OS changes. This can be up to three different times during a Task Sequence.
In order to change the options for the SMSTS.log, they need to be changed in three different locations:
Original Windows OS: Modify the registry in the original Windows OS (Replace and Refresh scenarios only)
When the ConfigMgr client is originally installed on a PC, the ConfigMgr client logging options can be set via MSI properties in the command line of the client install. These options include the following parameters:
The above parameters are described in the following TechNet article:
About Configuration Manager Client Installation Propertieshttp://technet.microsoft.com/en-us/library/bb680980.aspx
To change any of the above parameters after the ConfigMgr client has been installed, the corresponding registry entries need to be changed:
ConfigMgr 2007 32bit OSes and all ConfigMgr 2012HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\Logging\@GLOBAL\debuglogging ConfigMgr 2007 64bit OSesHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432NodeMicrosoft\CCM\Logging\debuglogging
In the case of CCMDEBUGLOGGING, only the parent key needs to be created. A value under the key does not need to exist.
ConfigMgr 2007 32bit OSes and all ConfigMgr 2012HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\Logging\@GLOBAL\debuglogging!LogEnabled ConfigMgr 2007 64bit OSesHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432NodeMicrosoft\CCM\Logging\debuglogging!LogEnabled
A DWORD value of 1 enables logging, while a DWORD value of 0 disabled logging. The default is 1 (enabled)
ConfigMgr 2007 32bit OSes and all ConfigMgr 2012HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\Logging\@GLOBAL!LogLevelConfigMgr 2007 64bit OSesHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432NodeMicrosoft\CCM\Logging\@GLOBAL!LogLevel
The value can be a DWORD value for 0 to 3, with 0 being the most verbose logging. The default value is 1.
ConfigMgr 2007 32bit OSes and all ConfigMgr 2012HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\Logging\@GLOBAL!LogMaxHistory ConfigMgr 2007 64bit OSes HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432NodeMicrosoft\CCM\Logging\@GLOBAL!LogMaxHistory
The value is a DWORD value that specifies the amount of rolled over/historical logs to keep. This does not include the current log. A value of 3 would keep a total of 4 logs - the current log and 3 rolled over/historical logs. The default value is 1.
ConfigMgr 2007 32bit OSes and all ConfigMgr 2012HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\Logging\@GLOBAL!LogMaxSizeConfigMgr 2007 64bit OSesHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432NodeMicrosoft\CCM\Logging\@GLOBAL!LogMaxSize
The value is a DWORD value for the size of the log file in bytes (decimal). The default value is 250000 (decimal), or 250000 bytes (approximately 245 KB).
Generally, for the purposes of the SMSTS.log and OSD, the only three parameters that need to be changed are CCMLOGLEVEL, CCMLOGMAXHISTORY, and CCMLOGMAXSIZE. Logging is set by default, so CCMENABLELOGGING normally does not need to be changed.
Please note that changing any of the above values changes the settings for ALL ConfigMgr client logs, not just the SMSTS.log.
After the value of any of the above values has been changed in the registry, the ConfigMgr client needs to be restarted in order for the changes to take effect. This can be done by restarting the ConfigMgr client service (SMS Agent Host) or restarting the computer.
Since a restart of the ConfigMgr client needs to take place, any of changes to the values of the above registry keys cannot take place during a Task Sequence. Any attempt to restart the ConfigMgr client service in the full Windows OS while the Task Sequence is running will kill the Task Sequence and cause it to fail (since the Task Sequence engine is dependent on the ConfigMgr client service). For this reason, any changes to the above registry key values, and the subsequent restart of the ConfigMgr client service, need to be done outside of a Task Sequence and before the Task Sequence begins (i.e. normal ConfigMgr Software Distribution, Domain Policy, etc.)
If when attempting to modify any of the above registry keys you receive the following error message:
Error Editing ValueCannot edit <value>: Error writing the value's new contents
where <value> is the key value trying to be changed, this is usually due to insufficient permissions on the @GLOBAL registry key for the user trying to make the change. To resolve the issue, modify the permissions of the @GLOBAL key to allow the user making the changes to modify the values under the key.
Please note that in Replace scenarios, the above changes would need to be done on the original/old computer.
Windows PE Boot Image: Add the SMSTS.ini file to the Windows Directory of the Boot Images (New Computer, Refresh, and Replace scenarios)
During an OSD Task Sequence, when the PC boots into WinPE from the Boot Image, the SMSTS.log settings are not controlled via the same registry keys as in the full Windows OS. Instead the SMSTS.log settings are controlled via entries in a file called SMSTS.ini file which resides in the Windows directory of WinPE.
In order to change the logging options for the SMSTS.log file while in WinPE, the SMSTS.ini files has to be either created or modified. If no SMSTS.ini file exists, then default values are used. By default, the SMSTS.ini file does not exist in the default Boot Images of ConfigMgr so the default options are used.
The logging options and values that can be modified are:
The value names are basically the same as the registry value names from the full OS, but without the preceding CCM prefix. Similar to logging in the full OS, for the purposes of the SMSTS.log and OSD, the only three parameters that usually are changed are LOGLEVEL, LOGMAXHISTORY, LOGMAXSIZE. The value of LOGMAXSIZE is specified in bytes.
To modify the values, in NotePad, create a SMSTS.ini file with a [Logging] section that contains the parameters that need to be modified. The file then needs to be injected in the Windows directory of the Boot Image.
For example, to change the SMSTS.log file size to 5MB, set the log level to the most verbose level, and increase the amount of rolled over/historical logs to 3, the following would be the contents of the SMSTS.ini file:
To inject the SMSTS.ini file into the Windows directory of a Boot Image, the file osdinjection.xml can be modified to add the SMSTS.ini file as one of the files to be injected when the Boot Image is updated. The file osdinjection.xml contains information on which files should be injected into the Boot Image and where they should be injected.
To inject the SMSTS.ini file into the Boot Images:
Once the Distribution Points have finished updating for each Boot Image, each Boot Image should have the updated log settings for the SMSTS.log.
As an option, instead of using the above process, after the SMSTS.ini has been created, it can be manually injected into the Windows directory of the Boot Image using ImageX or DISM. However using the osdinjection.xml file preserves and does not modify the original Boot Image (boot.wim), so it is the preferred method.
Newly installed Windows OS: Add logging options to the Setup Windows and ConfigMgr task of the Task Sequence (New Computer, Refresh, and Replace scenarios)
Since the ConfigMgr client is always installed as part of a ConfigMgr OSD Task Sequence, the MSI properties to set logging options, as explained under the section "Modify the registry in the original Windows OS", can be used to change the logging options of the SMSTS.log:
For example, to change the SMSTS.log file size to 5MB, set the log level to the most verbose level, and increase the amount of rolled over/historical logs to 3, the following would be added to the "Installation properties" text box of the "Setup Windows and ConfigMgr" task:
CCMLOGMAXSIZE=5242880 CCMLOGLEVEL=0 CCMLOGMAXHISTORY=3
Please note that any changes made to the logging options in the "Installation properties" text box of the "Setup Windows and ConfigMgr" task will affect ALL ConfigMgr client logs and not just the SMSTS.log.