If targeting a host whose pmcd suffers numerous brief outages, pmmgr
(in granular mode) can generate numerous archives. It defers their
merge until the next granularity period (day). (pmlogger_check* could
do the same, if it were to respond to the death of pmlogger/pmcd's as
quickly as pmmgr does).
The problem comes up if pmlogextract is given >350ish archives as input,
overflowing the default-1024 "ulimit -n" / setrlimit(2) RLIMIT_NOFILE
with:
pmlogextract: Error: cannot open archive
"/var/log/pcp/pmmgr/HOSTNAME/archive-20140430.132052": Too many open files
because it keeps open all input volumes, meta, and index files, throughout
the merging process. It would be better if pmlogextract worked in two
passes, computing an ordering on the input archives first, then copying
them over (with only the current input & output files actually being open).