neo4j/enterprise — pull request #56 by jakewins (2012-06-28 16:11:42+00:00)
Title: Electionhistory

Added a small python script to ha/bin. It takes a set of messages.log's, and prints out a master election history, warning if a server has become master when another node has more transactions.

./electionhistory server*/messages.log

1338356922.0 101 started as slave Last TX: 532591 (+6)
1338356956.0 102 started as master Last TX: 532593 (+2)
1338362936.0 103 started as master Last TX: 532903 (+310)
1338443445.0 103 started as slave Last TX: 534763 (+1860)
1338443855.0 103 started as slave Last TX: 534867 (+104)
1338443889.0 101 started as master Last TX: 534763 (-104)
WARN: This master has a lower TX id than server 103 (534763 < 534867)
1338498601.0 101 started as slave Last TX: 536165 (+1402)
1338498930.0 101 started as slave Last TX: 536327 (+162)
1338499149.0 103 started as master Last TX: 536165 (-162)
WARN: This master has a lower TX id than server 101 (536165 < 536327)