Skip to content

Instantly share code, notes, and snippets.

@bill-long
Last active September 23, 2021 23:00
Show Gist options
  • Save bill-long/753fac2817dbb2ab16ca7e790ef46cb4 to your computer and use it in GitHub Desktop.
Save bill-long/753fac2817dbb2ab16ca7e790ef46cb4 to your computer and use it in GitHub Desktop.
RpcClientAccess log parse examples for MapiExceptionRpcServerTooBusy
# Show MapiExceptionRpcServerTooBusy count by file
Get-ChildItem *.log | Sort-Object LastWriteTime | % {
$count = (sls "MapiExceptionRpcServerTooBusy" $_).Count
[PSCustomObject]@{ File = $_.Name; LastWrite = $_.LastWriteTime; Count = $count }
} | ft
# Show MapiExceptionRpcServerTooBusy count by hour
sls "^(\S+?),.*MapiExceptionRpcServerTooBusy" *.log | % {
$time = [DateTime]::Parse($_.Matches.Groups[1].Value)
[PSCustomObject]@{
Time = $time
Hour = New-Object DateTime($time.Year, $time.Month, $time.Day, $time.Hour, 0, 0)
}
} | Group Hour | ft Count,Name
# Show MapiExceptionRpcServerTooBusy count by minute
sls "^(\S+?),.*MapiExceptionRpcServerTooBusy" *.log | % {
$time = [DateTime]::Parse($_.Matches.Groups[1].Value)
[PSCustomObject]@{
Time = $time
Minute = New-Object DateTime($time.Year, $time.Month, $time.Day, $time.Hour, $time.Minute, 0)
}
} | Group Minute | ft Count,Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment