~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/script/find_lost_objecter.pl

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use strict;
 
4
my %ack;
 
5
my %commit;
 
6
 
 
7
my $line = 0;
 
8
while (<>) {
 
9
        #print "$line: $_";
 
10
        $line++;
 
11
 
 
12
        #client0.objecter writex_submit tid 21 osd0  oid 100000000000001 851424~100000
 
13
        if (my ($who, $tid) = /(\S+)\.objecter writex_submit tid\D+(\d+)\D+osd/) {
 
14
#               print "$who.$tid\n";
 
15
                $ack{"$who.$tid"} = $line;
 
16
                $commit{"$who.$tid"} = $line;
 
17
        }
 
18
 
 
19
        #client1.objecter handle_osd_write_reply 304 commit 0
 
20
        #client1.objecter handle_osd_write_reply 777 commit 1
 
21
        if (my ($who, $tid, $commit) = /(\S+)\.objecter handle_osd_write_reply\D+(\d+)\D+commit\D+(\d)/) {
 
22
#               print "$who.$tid\n";
 
23
                delete $ack{"$who.$tid"};
 
24
                delete $commit{"$who.$tid"} if $commit;
 
25
        }
 
26
 
 
27
}
 
28
 
 
29
for my $op (keys %commit) {
 
30
        print "---- lost commit $op $commit{$op}\n";
 
31
}
 
32
for my $op (keys %ack) {
 
33
        print "---- lost ack $op $commit{$op}\n";
 
34
}