Continuing with my series of blogs describing what each line in the Sitecore logs mean, today I want to talk about Heartbeat, Dump Configuration Files and Performance Counters.
In this post, we are still examining the log file. In future posts, we will explore Client, Crawling, Eds, Exm, Fxm, Search, Publishing, Aggregation and WebDAV logs.
If you missed the first part of my series, please take a look at:
- Understanding Sitecore logs – Part 1: xDB, Tracking, License, Path Analyzer and Memory Monitor
- Understanding Sitecore logs – Part 2: Caches and XML configuration load
- Understanding Sitecore logs – Part 3: Sitecore version, assemblies, environment and scheduler
405248 13:27:11 INFO Heartbeat - Initializing 405248 13:27:11 INFO Heartbeat - Interval set to: 00:00:02 405248 13:27:11 INFO Heartbeat - Worker thread started
These logs are created by the class
Sitecore.Services.Heartbeat located in the
Heartbeat is an static object that has a public “Beat” event to which classes can delegate to and be able to run code every given seconds. The heartbeat interval is defined by a setting named “HeartbeatInterval” located in the \App_Config\Sitecore.config file. The default interval is 2 seconds.
The only class that uses it is
Sitecore.Services.AlarmClock located in the same assembly.
Sitecore.Services.AlarmClock has a public event named “Ring” to which many classes subscribe to. Some of them are
Sitecore.Diagnostics. HealthMonitorHook, etc.
The interval at which the
Sitecore.Services.AlarmClock runs is defined in its constructor, so it doesn’t run every 2 seconds as the
When Heartbeat is disabled, you are going to see the following entry in the logs:
Heartbeat - Heartbeats are disabled (interval is 00:00:00)
Dump Configuration Files
386700 13:27:11 INFO DumpConfigurationFiles: Dump folder is C:\inetpub\wwwroot\example.com\App_Data\diagnostics\configuration_history\20200720Z.112711Z 386700 13:27:12 INFO DumpConfigurationFiles: C:\inetpub\wwwroot\example.com\App_Config has been dumped 386700 13:27:12 INFO DumpConfigurationFiles: C:\inetpub\wwwroot\example.com\Web.config has been dumped 386700 13:27:12 INFO DumpConfigurationFiles: C:\inetpub\wwwroot\example.com\Global.asax has been dumped 386700 13:27:12 INFO DumpConfigurationFiles: C:\inetpub\wwwroot\example.com\sitecore\shell\sitecore.version.xml has been dumped 386700 13:27:12 INFO DumpConfigurationFiles: Zipping of the dumped configuration files is enabled 386700 13:27:12 INFO DumpConfigurationFiles: C:\inetpub\wwwroot\example.com\App_Data\diagnostics\configuration_history\20200720Z.112711Z.zip has been created 386700 13:27:13 INFO DumpConfigurationFiles: C:\inetpub\wwwroot\example.com\App_Data\diagnostics\configuration_history\20200720Z.112711Z has been removed 386700 13:27:13 INFO DumpConfigurationFiles: Completed
DumpConfigurationFiles is a processor that zips and copy some files – mostly configuration files – to a specified directory every time the application starts.
It is useful since it allows you to monitor all the changes that are made to the configuration files in live environments after a release.
The DumpConfigurationFiles is defined in the \App_Config\Sitecore\CMS.Core\Sitecore.Diagnostics.config file and executed by the class
Sitecore.Pipelines.Loader.DumpConfigurationFiles located in
By default, the dump folder is $(dataFolder)/diagnostics/configuration_history and the following folders and files are copied:
You can add a patch to include more files, change the dump folder, or disable it in a developer machine.
405248 13:27:12 INFO Sitecore.Analytics.Aggregation.Diagnostics.PerformanceCounters.AnalyticsAggregationCount are initialized 405248 13:27:12 INFO Sitecore.Analytics.Processing.Diagnostics.PerformanceCounters.AnalyticsProcessingCount are initialized 405248 13:27:12 INFO Sitecore.Analytics.Diagnostics.PerformanceCounters.AnalyticsSqlCount are initialized 405248 13:27:12 INFO Sitecore.Analytics.DataAccess.Diagnostics.PerformanceCounters.AnalyticsDataAccessCount are initialized 405248 13:27:12 INFO Sitecore.Analytics.Tracking.Diagnostics.PerformanceCounters are initialized
The next log entries register the initialization of the performance counters. These counters are defined in several configuration files:
Counters are used to provide information as to how well the application is performing. The counter data can help determine system bottlenecks and fine-tune system and application performance. For more information, read the Microsoft’s documentation on Performance Counters.
Sitecore Performance Counters are enabled by default and defined in the “Counters.Enabled” setting. You might need to grant permission on Performance Log Users group to the AppPool User used by your Sitecore instance. See more on Enable or disable performance counters.
That’s all for today.