On 07/07/15 03:51, Rohan Arora wrote:
For the program that I am writing, I want to be able to append an
already existing archive, as the name is derived in a specific way, so I
cannot name the archive something different if it is for the same host.
However, I am taking the results for the previous x amount of hours, so
I would like to be able to append to an existing archive. This would
only be an issue if pmlogger is stopped and restarted. Currently,
pmlogger is being started from a bash script file. Is there an option
when starting pmlogger from the terminal to have it append to file "x"
if it exists, else create it?
I'm afraid you're going to be out of luck here.
There are a bunch of data integrity and data semantic issues that
prevent arbitrarily appending to an archive.
You can however take a set of archives from the same host and combine
them with pmlogextract (it is really a temporal merge, but this becomes
a concatenation if the the archives do not overlap in time).
Another option would be to use pmlc(1) to control the one pmlogger to
add and/or delete metrics and instances to be logged over time.
|