Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   logarchive    ( 5 )

формат архива показателей производительности (performance metrics archive format)

INDEX FILE (.index) RECORDS

After the archive log label record, the temporal index file
       contains a plainly concatenated, unframed group of tuples, which
       relate timestamps to 32-bit seek offsets in the volume and meta
       files.  These records are fixed-size, fixed-format, and are not
       enclosed in the standard length/payload/length wrapper: they take
       up the entire remainder of the .index file.  See also
       libpcp/logutil.c.

┌───────┬────────┬───────────────────────────────────────────────────┐ │Offset │ Length │ Name │ ├───────┼────────┼───────────────────────────────────────────────────┤ │ 0 │ 4 │ event time, seconds part (past UNIX epoch) │ │ 4 │ 4 │ event time, microseconds part │ │ 8 │ 4 │ archive volume number (0...N) │ │ 12 │ 4 │ byte offset in .meta file of pmDesc or pmLogIndom │ │ 16 │ 4 │ byte offset in archive volume file of pmResult │ └───────┴────────┴───────────────────────────────────────────────────┘

Since the temporal index is optional, and exists only to speed up time-based random access to metrics and their metadata, the index records are emitted only intermittently. An archive reader program should not presume any particular rate of data flow into the index. However, common events that may trigger a new temporal-index record include changes in instance-domains, switching over to a new archive volume, and starting or stopping logging. One reliable invariant however is that, for each index entry, there are to be no meta or archive-volume records with a timestamp after that in the index, but physically before the byte-offset in the index.