domingo, 8 de enero de 2012

Mover el directorio de logs de Sharepoint

For production SharePoint 2010 servers, the C drive should be at least 80 GB.

When I do SharePoint 2010 installs I always recommend to my customers that they have a secondary drive. That drive serves a few purposes, and one of them is to serve as a place to store stuff you can move off of your C drive. SharePoint’s logs are a great candidate for that.

There are two sets of logs you want to move, the diagnostic logs and the usage logs. An important note is that every machine in the farm must have the same paths for this to work. If one doesn’t have a D drive or something SharePoint will freak out.

Here are the steps:

Diagnostic logs:

Central Admin > Monitoring > Configure Diagnostic Logging (/_admin/metrics.aspx). The setting is the “Trace Log” path at the bottom. I strongly recommend only changing the drive letter. Leave the path alone. It’ll make it easier for you to find things later on.  You can also use PowerShell to change this. The cmdlet is Set-SPDiagnosticConfig and the parameter is –LogLocation.

image

With PowerShell:

Set-SPDiagnosticConfig -LogLocation "E:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS”

Usage logs:

Central Admin > Monitoring > Configure web analytics and health data collection (/_admin/LogUsage.aspx). The setting is the “Log file location” setting. Set it to the same path you did the Trace Log above. Again, don’t get fancy and put it at something like “D:\SharePoint\Stuff\Things\LogsAreHiddenHere” The PowerShell cmdlet to alter this is Set-SPUsageService and the parameter is –UsageLogLocation.

image

With PowerShell:

Set-SPUsageService -UsageLogLocation "E:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS\"

How it looks:

image

Your disk savings won’t be crazy big, but every little bit counts. By way of comparison the Logs folder on this web server is taking up 3 GB:

SNAGHTML1809708

The Usage logs get removed once they’re parsed and the Trace logs in that directory go back to 12/19/2011. Your server will certainly have more traffic than mine does, so your logs will probably be larger.

Fuente:

http://www.toddklindt.com

http://artykul8.com/2011/07/moving-sharepoint-2010-log-and-index-locations/

Link útiles

http://archive.msdn.microsoft.com/ULSViewer

http://sptwentyten.wordpress.com/2010/04/13/change-the-iis-log-file-directory-via-powershell/

No hay comentarios:

Publicar un comentario