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

Redundant logs from zfs-auto-snapshot.cron.frequent compared to the others #70

Open
lindhe opened this issue Jul 9, 2017 · 1 comment

Comments

@lindhe
Copy link
Contributor

lindhe commented Jul 9, 2017

The other cron scripts seems to take a whole other form than that particular script, and I think that created redundant logs from CRON compared to the other ones.

My issue is really that the frequent snapshots seems to create syslogs like

Jul  9 06:30:01 server CRON[13941]: (root) CMD (which zfs-auto-snapshot > /dev/null && zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4  //)
Jul  9 06:30:06 server zfs-auto-snap: @zfs-auto-snap_frequent-2017-07-09-0430, 1 created, 1 destroyed, 0 warnings.

while the other scripts simply cause

Jul  9 06:25:40 server zfs-auto-snap: @zfs-auto-snap_daily-2017-07-09-0425, 1 created, 0 destroyed, 0 warnings.

I may be in the wrong (since the number of entries in the log is overwhelmingly of the frequent ones in any case, which makes it slightly hard to read exhaustively) but I think this is the case.

So... Could we restructure the scripts somehow to make the logging smoother...?

(I'm looking at the output of grep -i "zfs" /var/log/syslog)

@lindhe lindhe changed the title Why is zfs-auto-snapshot.cron.frequent so different from the others? Redundant logs from zfs-auto-snapshot.cron.frequent compared to the others Jul 9, 2017
@adamhotep
Copy link

adamhotep commented Jan 22, 2022

That's an artifact of its invocation ("frequent" uses /etc/cron.d/zfs-auto-snapshot and runs from a crontab entry in order to specify its nonstandard schedule (take a peek!), the others run via anacron or else run-parts in /etc/cron.$schedule/zfs-auto-snapshot, which is a script rather than a crontab). Explicit cron jobs are logged as cron runs them.

As a "solution" to this, these snapshots could instead be implemented with some sleep calls inside the hourly script, but that's a hack and it won't start until the hourly script is first run after boot. That sounds quite suboptimal.

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