Skip to content

Instantly share code, notes, and snippets.

@joshuacronemeyer
Created June 4, 2014 22:56
Show Gist options
  • Save joshuacronemeyer/1766a9a1040b2c1fee14 to your computer and use it in GitHub Desktop.
Save joshuacronemeyer/1766a9a1040b2c1fee14 to your computer and use it in GitHub Desktop.
AZ memory error log munging
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