Skip to content

Instantly share code, notes, and snippets.

@lukebakken
Created December 3, 2014 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukebakken/c69c76c8ec529360911e to your computer and use it in GitHub Desktop.
Save lukebakken/c69c76c8ec529360911e to your computer and use it in GitHub Desktop.
Large Object Grep
#!/usr/bin/env perl
use strict;
use warnings;
while (<>)
{
# 2014-10-05 14:59:45.023
my @F = split;
if (/(\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}).*Reading large object/)
{
print(qq(R $1 ),$F[9],q( ),$F[11],qq(\n));
}
elsif (/(\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}).*Writing very large object \((\d+) /)
{
print(qq(W $1 ),$2,q( ),$F[11],qq(\n));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment