Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pmlogger_daily: 'compress archive data files after N days' seems to be off by one day. #99

Closed
sikadiamond opened this issue Jul 25, 2016 · 1 comment

Comments

@sikadiamond
Copy link

As executed on todays date:

/usr/lib/pcp/bin/pmlogger_daily -X xz -x 1
ls /var/log/pcp/pmlogger/hostname/
20160710.0.xz   20160711.meta   20160713.0.xz   20160714.index  20160715.meta   20160717.0.xz   20160718.index  20160719.meta   20160721.0.xz   20160722.index  20160723.meta   20160725.00.10.0      20160725.09.05.index  20160725.09.12.meta
20160710.index  20160712.0.xz   20160713.index  20160714.meta   20160716.0.xz   20160717.index  20160718.meta   20160720.0.xz   20160721.index  20160722.meta   20160724.0      20160725.00.10.index  20160725.09.05.meta   Latest
20160711.0.xz   20160712.index  20160713.meta   20160715.0.xz   20160716.index  20160717.meta   20160719.0.xz   20160720.index  20160721.meta   20160723.0      20160724.index  20160725.00.10.meta   20160725.09.12.0      pmlogger.log
20160711.index  20160712.meta   20160714.0.xz   20160715.index  20160716.meta   20160718.0.xz   20160719.index  20160720.meta   20160722.0.xz   20160723.index  20160724.meta   20160725.09.05.0      20160725.09.12.index  pmlogger.log.prior

20160722.0.xz is het last compressed archive...

/usr/lib/pcp/bin/pmlogger_daily -X xz -x 0
ls /var/log/pcp/pmlogger/hostname/
20160710.0.xz   20160711.meta   20160713.0.xz   20160714.index  20160715.meta   20160717.0.xz   20160718.index  20160719.meta   20160721.0.xz   20160722.index  20160723.meta   20160725.00.10.0      20160725.09.05.index  20160725.09.12.meta   Latest
20160710.index  20160712.0.xz   20160713.index  20160714.meta   20160716.0.xz   20160717.index  20160718.meta   20160720.0.xz   20160721.index  20160722.meta   20160724.0      20160725.00.10.index  20160725.09.05.meta   20160725.09.13.0      pmlogger.log
20160711.0.xz   20160712.index  20160713.meta   20160715.0.xz   20160716.index  20160717.meta   20160719.0.xz   20160720.index  20160721.meta   20160723.0.xz   20160724.index  20160725.00.10.meta   20160725.09.12.0      20160725.09.13.index  pmlogger.log.prior
20160711.index  20160712.meta   20160714.0.xz   20160715.index  20160716.meta   20160718.0.xz   20160719.index  20160720.meta   20160722.0.xz   20160723.index  20160724.meta   20160725.09.05.0      20160725.09.12.index  20160725.09.13.meta

Now 20160723.0.xz is het last compressed archive, but one would expect with 0 days to have 20160724.0 compressed as well, unless I am missing something.

@kmcdonell
Copy link
Member

pmlogger_daily is really intended to be run at the same time (00:10 by default) each day from cron.

The -x (and -k and -t) options all use the modified time of the inode (not the name of the file) to determine which files to compress (or cull).

So there is considerable scope for this to be "off by one (or more)", especially for interactive invocation at a random time with respect to the scheduled cron runs.

I don't think there is a bug here and there is reasonable coverage of this functionality in the QA suite.

I'll leave it to @sikadiamond to close the issue if (s)he agrees.

natoscott added a commit to natoscott/pcp that referenced this issue Sep 7, 2022
…8f460da..65fc7b81f3

65fc7b81f3 Release 0.8.1
a63aa04fed Fix async api issues (performancecopilot#107)
a439a20f4f No command retries due to CROSSSLOT
b96d43fd95 Connect using redisConnectWithOptions() (performancecopilot#103)
c47e8a9cf3 Update hiredis version in build examples
0a3b20f691 Update Makefile
4a581e91e4 Use common build warnings
08ffdd30f0 Remove usage of hiredis internal flags (performancecopilot#101)
f3091fef52 Release 0.8.0 (performancecopilot#99)
0e741c6dd8 Add Redis compatibility testing to CI (performancecopilot#97)
1aa93a0862 Add crude support for BITFIELD and BITFIELD_RO (performancecopilot#96)
295bf3c81e Add async transaction tests
6c0aecfcf1 Deprecate non-block options which have no effect (performancecopilot#89)
16ec08bb8b Accept multiple field and value arguments in HSET (performancecopilot#86)
ff76aac0f5 Timeout tests and corrections (performancecopilot#84)
7c39940fa9 Move SSL support to own library (performancecopilot#80)
573c1006f9 README updates (performancecopilot#81)
e642e42df1 Add windows and macOS builds to CI (performancecopilot#76)
5c9e294f75 tests: fix error handling in clusterclient_reconnect_async (performancecopilot#70)
4a69cb65d1 tests: add reconnect test (performancecopilot#68)
512a790dad reset cluster context errors in redisClusterAsyncFormattedCommandToNode

git-subtree-dir: vendor/github.com/Nordix/hiredis-cluster
git-subtree-split: 65fc7b81f31389b878a669710bac9d7042c2404b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants