Tuesday, May 29, 2012

How to generate Cluster.log for Windows or SQLServer Cluster troubleshooting

If you are doing troubleshooting with your Windows/ SQLServer Cluster you need to generated Cluster.log

Use below command to generate the cluster.log
C :\> cluster /cluster:clustername log /gen

The logs will be generated on each cluster node under %WinDir%\Cluster\Reports folder.You need to login into each node in order to collect the stats.

You can use below command to generate the cluster.log for all nodes on the node where you are running the command.

C:\> cluster /cluster:clustername log /gen /copy:.

Using Powershell - PowerShell is a cluster scripting language.

For the Windows Server 2008 R2 you may access PowerShell management
Start à Administrator Tools à Windows PowerShell Modules.

You can load PowerShell with Failover Clustering in two ways:
1. Open “Failover Cluster PowerShell Management” from the shortcut in Administrative Tools
2. Run powershell.exe as administrator

You will find the powershell.exe under C:\Windows\System32\WindowsPowerShell\v1.0

You can also generate the cluster log using PowerShell.
Syntax:- Get-ClusterLog [-InputObject ] [[-Node] ] [-Cluster ] [-Destination ] [-TimeSpan ] []

Use below command to generate a log file for each node of the local cluster
Get-ClusterLog

Use below command to generate a log file for each node of the local cluster, and copies all logs to the local TEMP folder
Get-ClusterLog – denstination c:\Temp

Use below command to generate a log file for the local cluster in the cluster reports folder on each node of the cluster. The log covers the last 5 minutes
Get-ClusterLog -TimeSpan 5

You can refer below link for Failover Cluster Cmdlets in Windows PowerShell
http://technet.microsoft.com/en-us/library/ee461009.aspx

Windows PowerShell user guide
http://technet.microsoft.com/en-us/library/bb978526.aspx

Regards
Satishbabu Gunukula
http://sqlserver-expert.com/

3 comments:

  1. Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

    http://www.sqlservermasters.com/

    ReplyDelete
  2. Its nice to hear that the post is helpful to you.

    Regards,
    Satish

    ReplyDelete
  3. Log files can be read by a program called web log analysis software or web log analyzer.seo log analyzer

    ReplyDelete