Monthly Archives: May 2011

Wrox Real World Sharepoint 2010 – Chapter 3

UL – Unifeid Logging servicve. Can report events to three different location:
(1) Sharepoint trace logs
(2) Windows Event Logs
(3) Sharepoint logging database.

Sharepoint Trace Logs location:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
By default, a new log file is created every 30 minutes.
This changes the time to 60 min:
Set-SPDiagnosticConfig -LogCutInterval 60

To select which event to monitor in the trace log: Admin –> Monitoring –> Configure Diagnostic Logging.
Also on the same page, you can change the trace log file location, delete log files time limit (14 days) and file size etc.
This is a FARM level setting, so make sure all servers have the same drive letter path etc.

Get or set Diagnostic setting:

get help on any Powershell command:
Get-Help Set-SPDiagnosticConfig -Examples

search command by keyword:
Get-Command -Noun SPLogLevel (Powreshell comannd is “Verb-Noun”, such as “Get-Help”)

Get the sp log level of all objects in the “Access services” area:
Get-SPLoglevel | Where-Object {$_.area.tostring() -eq “Access Services”}

(P.77, 05/30/2011

** Correlation ID is a unique GUID that is assigned to each conversion a user or process has with Sharepoint. When an error occurs, an admin can use the Correlation ID to track down in the trace log.

** Developer dashboard: A dsahboard that shows how long it took for a page to load, and which components are loaded. The display level can be: On, Off, OnDemand. It’s a Farm-Wide setting!!!!!! Only users with AddAndCustomizePages permission can see it.

** MSDN ULS Viewer: Allows realtime monitoring of the ULS log. Do smart highlighting. You can do Open–> File, or Open –> ULS (the default “/LOG” folder). Smart highlight: Mouse over a column data, and other cells with the same data are hghlighted. Use Get-SPLogEvent to search trace log. New-SOLogFile tells Sharepoint to start a new trace log file. Merge-SPLogFile to merge log files from all servers into one — by default, only get the last hour data.

Sharepoint also wirte to Windows Event Log (Monitoring –> Configuring Diagnostic Logging) For Windows Event Log only, you can set “event throttling”. Keeps from Windows Event log from being overrun by the same message.

** Logging Database: Farm-Wide repository of Sharepoint events from every machine in your farm. Aggregate info from many different location, and write them into one database. If you destroy the database, you can delte it, and then have Sharepoint re-create it.

(P.88, 05/31/2011, 11:59PM)

By default, health data collection is enabled. Admin –> Monitoring –> Reporting –> Configure usage and health data collection. By default, the health data log are saved in the same folder as the trace logs (…..\14\LOGS\), but with the extension of *.usgae.  Defalt logging database name: WSS_Logging.

To view analytics report for each [site collection], go to the site collection, Site Actions –> Site settings –> Web Analytics

** Admin –> Monitoring –> Health Analyzer: Sharepoint uses timer jobs to check on system metrics; when a rule fails, alert an administrator, or just fix the problem. Sharepoint comes with 60 “Rule Definitions”.

You can assign a preferred server for timer jobs per Content Database. Admin –> App Management –> Manage Content Database, click a content database name, and then select a preferred server for the timer job.

(6/1/2011, 09:15PM)