Created
June 4, 2014 22:56
-
-
Save joshuacronemeyer/1766a9a1040b2c1fee14 to your computer and use it in GitHub Desktop.
AZ memory error log munging
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
File.open("./may_18", "r") do |f| | |
f.each_line do |line| | |
if line.match(/web.1 .*Process running/) | |
memory = line.match(/mem=(\d{4})M/)[1] | |
time = line.match(/(2014-05.*) d/)[1] | |
puts "#{time}, #{memory}" | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment