A PMAPI application can already read archives that are
being written-to by a pmlogger, at least on a one-shot
basis. What's missing is the ability to leave a
pmapi archive context open for an extended period, and
monitor the growing archive.
Specifically, we should identify moments ...
- pmSetMode() calls
- pmGetArchiveEnd() calls
- pmFetch() about to return PM_ERR_EOL
... when PMAPI will check an archive
- fstat the open files (to identify changing archive by mtime changes)
- index last record contents (to identify then-largest logvol)
- directory entries (as fall back for enumerating the volumes)
... for new info
- newer metrics / indom snapshots (incremental __pmLogLoadMeta)
- newer index (incremental __pmLogLoadIndex)
- newer archive-end timestamp
The checking must be fast, and refreshing updated info
should be less costly than closing an archive context
then reopening it, for any of this to be worthwhile.
(Compressed archives are a complicating factor. They are
very expensive to open (bug #1099), but are unlikely to
be changing.)