Saturday, June 27, 2015

Bulit-in feature in Sharepoint for monitoring Sharepoint disk space usage


Types of SharePoint Log Events
  • Unified Logging System (ULS) 
  • Trace Logs 
  • Windows Event Logs 
  • Logging Database 
  • Health Analyzer 
  • Timer Jobs 


Unified Logging System (ULS) 

Eye for sharepoint and each event Report generating

We can see three ways:

  • SharePoint trace logs
  • Windows Event Log
  • SharePoint logging database

     Trace logs

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15
    The naming format for the trace log files is machinename-YYYYMMDD-HHMM.log, in 24-hour time.
     By default, a new log file is created every 30 minutes.
     You can change the interval by using Windows PowerShell with the Set-SPDiagosticConfig command. 
    The following powershell code snippet configures SharePoint to create a new trace log every 60 minutes.
    Set-SPDiagnosticConfig Set-SPDiagnosticConfig -LogCutInterval 60
    Get-SPDiagnosticConfig outputGet-Help set-SPDiagnosticConfig -ExamplesSet-SPDiagnosticConfig -LogLocation e:\Logs


    SharePoint LogLevel:
    Get-Command -Noun SPLogLevel

    Using SPLogEvent and SPLogFile:

    Get-SPLogEvent | Select -First 5
    Get-SPLogEvent | Select -Last 5
    Get-SPLogEvent | Select -First 20 -Last 10


    In Central Administration, click Monitoring on the left, and then select Configure Diagnostic Logging under the Reporting section
  • users reset logging Reset to default setting
Moving trace logs

Logging Database
  1. Search Queries
  2. Timer Jobs
  3. Feature Usage
  4. Content Import Usage
  5. Server Farm Health Data
  6. SQL blocked queries
  7. Site Inventory
  8. Search Query statistics
  9. Page Requests
  10. Site Inventory Usage
  11. Rating Usage
  12. Content Export Usage
  13. NT Events
  14. SQL high CPU/IO queries
  15. Search Crawl
  16. Query click-through

Powershell
get-command -noun spusage*
Set-SPUsageApplication -DatabaseServer <Database server name>
-DatabaseName <Database name> [-DatabaseUsername <User name>]

[-DatabasePassword <Password>] [-Verbose]
Health AnalyzerIn Central Administration, you click Monitoring and then select Health Analyzer.
Timer JobsGet-Command -noun SPTimerJob

No comments:

Post a Comment