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

Add timestamp into outpput #43

Closed
3eka opened this issue Mar 22, 2017 · 1 comment
Closed

Add timestamp into outpput #43

3eka opened this issue Mar 22, 2017 · 1 comment

Comments

@3eka
Copy link

3eka commented Mar 22, 2017

Hi Phillip,

I have tested your script and it works great! Many thanks for it (and its constant improvements)...

However, I would like to see (example of output) this written with time stamps:

sending srv2/zfs_id_1065@zrep_000235 to srv1:srv1/zfs_id_1065
Expiring zrep snaps on srv2/zfs_id_1065
Also running expire on srv1:srv1/zfs_id_1065 now...
Expiring zrep snaps on srv1/zfs_id_1065

Like

[1970-01-01 01:00:00] sending srv2/zfs_id_1065@zrep_000235 to srv1:srv1/zfs_id_1065
[1970-01-01 01:02:00] Expiring zrep snaps on srv2/zfs_id_1065
[1970-01-01 01:04:00] Also running expire on srv1:srv1/zfs_id_1065 now...
[1970-01-01 01:06:00] Expiring zrep snaps on srv1/zfs_id_1065

Or something similar (maybe if enabled, to specify format)...

I guess, it should not be so complicated, and our logs will show exact time when zrep was doing tasks.

With best regards
Predrag Zečević

@ppbrown
Copy link
Member

ppbrown commented Mar 22, 2017

Hello,
sorry, I dont like how wide that makes the output.
I'm oldschool, and like output to nicely fit into 80 cols where possible :)
However, on the brighter side, you CAN see easily when snapshots were made, by using
zrep list -s
hamachi$ ./zrep list -s

Sample output:

NAME CREATION
rpool/zrepsrc@zrep_000000 Wed Mar 1 11:25 2017
rpool/zrepsrc@zrep_000001 Wed Mar 1 11:25 2017
rpool/zrepsrc@zrep_000002 Wed Mar 1 11:28 2017
rpool/zrepsrc@zrep_000003 Wed Mar 1 11:29 2017

@ppbrown ppbrown closed this as completed Mar 29, 2017
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