ceph/branches/marnberg/quota/script/find_lost_objecter.pl
marnberg 183857fe7e Created a quota branch
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1248 29311d96-e01e-0410-9327-a35deaab8ce9
2007-03-15 23:23:52 +00:00

35 lines
812 B
Perl
Executable File

#!/usr/bin/perl
use strict;
my %ack;
my %commit;
my $line = 0;
while (<>) {
#print "$line: $_";
$line++;
#client0.objecter writex_submit tid 21 osd0 oid 100000000000001 851424~100000
if (my ($who, $tid) = /(\S+)\.objecter writex_submit tid\D+(\d+)\D+osd/) {
# print "$who.$tid\n";
$ack{"$who.$tid"} = $line;
$commit{"$who.$tid"} = $line;
}
#client1.objecter handle_osd_write_reply 304 commit 0
#client1.objecter handle_osd_write_reply 777 commit 1
if (my ($who, $tid, $commit) = /(\S+)\.objecter handle_osd_write_reply\D+(\d+)\D+commit\D+(\d)/) {
# print "$who.$tid\n";
delete $ack{"$who.$tid"};
delete $commit{"$who.$tid"} if $commit;
}
}
for my $op (keys %commit) {
print "---- lost commit $op $commit{$op}\n";
}
for my $op (keys %ack) {
print "---- lost ack $op $commit{$op}\n";
}