6313c70 sanlock: renewal history

Authored and Committed by teigland 7 years ago
    sanlock: renewal history
    
    Keep a history of read and write latencies for a lockspace.
    The times are measured for io in delta lease renewal
    (each delta lease renewal includes one read and one write).
    
    For each successful renewal, a record is saved that includes:
    - the timestamp written in the delta lease by the renewal
    - the time in milliseconds taken by the delta lease read
    - the time in milliseconds taken by the delta lease write
    
    Also counted and recorded are the number io timeouts and
    other io errors that occur between successful renewals.
    
    Two consecutive successful renewals would be recorded as:
    
    timestamp=5332 read_ms=482 write_ms=5525 next_timeouts=0 next_errors=0
    timestamp=5353 read_ms=99 write_ms=3161 next_timeouts=0 next_errors=0
    
    timestamp is the value written into the delta lease during
    that renewal.
    
    read_ms/write_ms are the milliseconds taken for the renewal
    read/write ios.
    
    next_timeouts are the number of io timeouts that occured
    after the renewal recorded on that line and before the next
    successful renewal on the following line.
    
    next_errors are the number of io errors (not timeouts) that
    occured after renewal recorded on that line and before the
    next successful renewal on the following line.
    
    The command 'sanlock client renewal -s lockspace_name' reports
    the full history of renewals saved by sanlock, which by default
    is 180 records, about 1 hour of history when using a 20 second
    renewal interval for a 10 second io timeout.
    
    (A --summary option could be added to calculate and report
    averages over a selected period of the history.)
    
        
file modified
+54 -0
file modified
+1 -0
file modified
+136 -0
file modified
+17 -5
file modified
+2 -1
file modified
+3 -1
file modified
+21 -11
file modified
+2 -2
file modified
+52 -2
file modified
+17 -0
file modified
+11 -0
file modified
+1 -0
file modified
+1 -0
file modified
+6 -6
file modified
+4 -4
file modified
+4 -0
file modified
+15 -0
file modified
+2 -0