클러스터 로그 확인
Get-ClusterLog -UseLocalTime -Destination .
(Get_Cluster).ClusterLogLevel
리소스 정보
PS> Get-ClusterResource
PS> Get-ClusterResource "SQL Server" | Get-ClusterParameter
SQL Server 리소스의 HealthCheckTimeout, FailureConditionLevel 값을 확인할 수 있으며 아래와 같이 쿼리를 통해서도 이러한 속성값을 변경할 수 있습니다.
ALTER SERVER CONFIGURATION SET FAILOVER CLUSTER PROPERTY HealthCheckTimeout = 60000;
ALTER SERVER CONFIGURATION SET FAILOVER CLUSTER PROPERTY FailureConditionLevel = 3;
이벤트 로그
Get-EventLog [-AsString] [-ComputerName <string[]>] [-List] [<CommonParameters>]
Get-EventLog [-LogName] <string> [[-InstanceId] <Int64[]>] [-After <DateTime>] [-AsBaseObject] [-Before <DateTime>] [-ComputerName <string[]>] [-EntryType <string[]>] [-Index <Int32[]>] [-Message <string>] [-Newest <int>] [-Source <string[]>] [-UserName <string[]>] [<CommonParameters>]
PS> Get-EventLog -list
최근 3개의 시스템 로그 확인하고 Message 내용을 좀 더 자세히 보기 위해 Format-List cmdlet 을 사용합니다.
PS> Get-EventLog System -newest 3
PS> Get-EventLog System -newst 1 | Format-list
시스템 이벤트 로그 중 Source 값이 EventLog 인 것에 대한 필터링
PS> Get-EventLog System | Where-Object {$_.Source -eq "EventLog"}
이벤트 로그 Source(EventLog) 와 EventID(6005) 에 대한 OR 필터링
PS> Get-EventLog System -Source EventLog | Where-Object {$_.EventID -eq "6005"}
Index 번호를 사용하여 해당 이벤트 상세 확인
PS> $a = Get-EventLog System -Index 406
PS> $a | Format-List -property *
이벤트 로그 메시지에 포함된 문자열을 검색하여 해당 정보를 text 파일로 기록합니다.
PS> Get-EventLog System -message "*uptime*"
PS> Get-EventLog System -index 467 | Format-List > uptime.txt
이벤트 로그 발생 빈도 카운트
PS> $events = Get-EventLog System
PS> $events | Group-Object -property source -noelement | Sort-Object -property count -descending