Once your SharePoint Environment is up and running, you need to make sure you maintain it. In order to properly maintain SharePoint you need to check the error logs and monitor performance frequently. The free tools described below will help you do just this.
ULS viewer is a 3rd party tool for SharePoint 2013 that will read log files that are located here:
C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
ULS viewer allows you to view the SharePoint logs in real time. When you are viewing a SharePoint page that displays a Correlation Id(5) error you can use this tool to search for the ID and read more details relating to the error.
Figure 1: Unexpected Error
Figure 2: ULS Viewer
Once an error has occurred use the following steps to track down more details:
- Open ULS Viewer (Hit CTRL + U for a shortcut)
- Select File -> Open From -> ULS
- Point to the SharePoint Logs
- Refresh the SharePoint page that is causing the error
- Match the error Correlation ID to the Correlation column in ULS viewer
ULS viewer also allows you to filter the logs that are being displayed. You can filter by any of the columns shown in Figure 2. Additional filters are shown above and are labeled VerboseEx(1), Verbose(2), Medium(3) and High(4).
- VerboseEx – Low level diagnostic data, this is used for development.
- Verbose – Includes most actions and should also be used for development.
- Medium – Includes all messages except Verbose, VerboseEx, used to see data flow and sequence of operations. This setting will also include the high level events.
- High – Records all events that are unexpected and limit the functionality of SharePoint.
Download link: http://archive.msdn.microsoft.com/ULSViewer
Event Viewer is a built in Microsoft Management Console snap-in that allows you to view event logs for the server. This is a very useful tool as it will display both server events and SharePoint events. Windows logs provide built in event views for Application, Security, Setup, System and Forwarded Events as seen in Figure 3.
Figure 3: Event Viewer
You are also able to create custom event views to track specific events that matter to your company. The custom views can span and filter across multiple logs. If you custom view is complex you are able to save and export the view to use on other servers as needed. With event viewer you are also able to subscribe to events from other servers to enable you to view all the event logs of all the servers in your farm from a single location.
More information: http://technet.microsoft.com/en-us/library/cc766042.aspx
SQL server logs are mainly used to check for connectivity and permission errors. SQL Server Logs are also good to check and make sure your maintenance plan backups are running properly. The logs are displayed in plain text inside SQL Server Management Studio (SSMS). SQL will store 6 logs by default and this can be configure to store up to 99 depending on your needs.
SQL server logs:
- Login to your SQL server
- Open SQL Server Management Studio
- Select Management
- Select SQL Server Logs
- Right Select SQL Server Logs
- Select Configure
- Limit the number of logs as needed
Figure 4: SQL Server Logs
Figure 5: Modify log amount
Figure 6: Configure log settings
Developer Dashboard is built into SharePoint 2013 to troubleshoot SharePoint page performance. Once configured any user with Add and Customize Pages permission level or greater will be able to use this tool. To configure the Developer Dashboard you will first need to make sure usage data collection has been configured for your farm. This can be done using either Central Administration or PowerShell (Note: Using PowerShell will allow you to specify the database name).
- On the home page select Monitoring
- Under Reporting select Configure usage and health data collection
- Select Enable usage data collection
- Select the check boxes of events you want to log. (Note: You can change these at any time to either collect more or less information as needed)
PowerShell: (Run as administrator)
- Provision the Usage Application if not already done before proceeding to step 2:
- New-SPUsageApplication -Name “[Insert Name]” -DatabaseName “[Insert Name]”
$devdash.DisplayLevel = “On”
Once the Developer Dashboard is turned on you will see the icon shown in Figure 5 on every page that uses the default master page layout. Once you select the Developer Dashboard Icon it will open in a separate window. Figure 6 displays the developer dashboard in action. To turn off the developer dashboard repeat step 2 and change the DisplayLevel to “Off”.
Figure 7: Developer Dashboard Icon
Figure 8: Developer Dashboard
This tool provides a rich UI to enable to you view ULS logs, SQL Queries, REST Calls, Page Load Times and much more. Below is a short explanation of some of the tabs:
MDS (Minimal download strategy): Downloads only the changes from the current page to the new page (provided link for more information)
Server Info: Information about the server the request ran from
Scopes: Start and end time of each call the page made while loading
SQL: Shows SQL procedures and allows you to view the execution plan
SPRequests: View leaked SharePoint Requests
Asserts: View SharePoint Assertions
Service Calls: View SharePoint Service Calls
ULS: View ULS logs that correlate to the SharePoint Request
Cache Calls: View SharePoint Cache Calls
Another useful tool used for more advanced developer debugging is Fiddler.
Performance Monitor is a built in application used to monitor your systems overall performance. It allows you to view performance in real time and collect log data for later analysis. Performance Monitor uses performance counters to track the current system and application state.
You should also check your servers’ available disk space while you monitor performance. There have been several occasions where SharePoint will not function properly due to low disk space.
SQL and SharePoint Counter recommendations located here:
- Navigate to your desktop
- Open Server Manager
- Select Tools
- Select Performance Monitor
- Right Clock the graph and select Add counters and begin tracking performance
Figure 9: Add Counters
Figure 10: Select Counters to Add
Figure 11: Performance Graph
Health Analyzer is built into SharePoint 2013. It will provide warning and errors along with suggestions for problems with your farm. Depending on your environment some of these errors can be ignored. This will notify you if your service accounts have incorrect permissions, you are low on RAM, if you are low on disk space, and if your service applications are configured incorrectly.
- Navigate to Central Administrator
- Select monitoring
- Select review problems and solutions
Figure 12: Health Analyzer
User Profile Service
Almost every SharePoint farm is utilizing the User Profile Service. This service populates your users’ attributes into SharePoint. When you are synchronizing your accounts with SharePoint and it fails check the below location to see the errors. One of the main errors seen with this client is when people forget to grant their User Profile Synchronization account Replicate Directory Changes for the domain.
C:\Program Files\Microsoft Office Servers\15.0\Synchronization Service\UIShell\miisclient.exe
Figure 13: Synchronization Service Manager