Created
February 6, 2016 15:47
-
-
Save jincod/eee712faa93e649c2ec3 to your computer and use it in GitHub Desktop.
Powershell script for find and calculate urls with max errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gci | Select-String "\s502\s|\s504\s" | %{$_ -match 'GET (.*) HTTP/1.1'} | foreach { $matches[1] }| group-object -noelement | Where-Object {$_.Name -notlike "*solr*"} | Sort-Object Count -Descending | % {"{0} {1}" -f $_.Count, $_.Name} | Out-File result.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment