Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: How to compare 3 lists

by shammow (Novice)
on Oct 25, 2012 at 18:54 UTC ( #1000918=note: print w/ replies, xml ) Need Help??


in reply to Re: How to compare 3 lists
in thread How to compare 3 lists

Yes, zfs allows you to use a tunnel (we use mbuffer) to send snapshots between systems meaning you can create an independent mirror but without the performance penalty of synchronous systems like drbd (the downside is that you may use changes)..


Comment on Re^2: How to compare 3 lists
Re^3: How to compare 3 lists
by grizzley (Chaplain) on Oct 26, 2012 at 06:55 UTC
    Sorry, I have no idea about zfs and therefore no idea if this is 'yes' for timestamp or 'yes' for second question.

      Should have clarified.. It's a yes to both, all the snaps are identical on all the systems (name, date etc.). I'm just getting to grips with Perl so I'm going to play with the suggestions (it might take me a while though :-) ). Thanks.

        So that makes your problem really easy (untested code):
        $isok = 1; for $logname("logfile1", "logfile2", "logfile3") { open FH, $logname ...; @isthisfileok=(0)x 6; while(<FH>) { $isthisfileok[$1]++ if /^snapshot([1-6])/; # last if /^snapshot([7-9]|\d{2,})/; # are snapshots sorted numeri +cally? then you don't have to search whole file if found snapshot7 or + other } close FH; $somesnapshotnotfound = grep $_ == 0, @isthisfileok; $isok = 0 if !$somesnapshotnotfound; last if !$isok; # don't scan another file if already not ok } print "everything ok" if $isok;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000918]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2014-07-31 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls