sluetze

updated

13 years ago

S

sluetze

2 Intern

•

300 Posts

0

509

December 5th, 2013 02:00

Replication Sync-Analysis

Hi,

i'm trying to analyse my remote replikations to get the LastSyncTime and the NextSyncTime. At the moment I do this by executing:

for i in `nas_replicate -l |fgrep remote |awk '{ print $1}'`;do nas_replicate -i $i | fgrep -e Name -e Completion -e "Last Sync"; done

output:

Name                           = remote_replication_1

Last Sync Time                 = Thu Dec 05 07:04:16 CET 2013

Estimated Completion Time      = Thu Dec 05 21:52:46 CET 2013

[...]

this works, but i want the output in a different format, to be able to copy it to .csv or other related scripts.

the output i want to get is something like:

Name LastSyncTime Estimated Completion Time
remote_replication_1 Thu Dec 05 07:04:16 CET 2013 Thu Dec 05 21:52:46 CET 2013
remote_replication_2 Thu Dec 05 07:04:16 CET 2013 Thu Dec 05 21:54:46 CET 2013

of course not as table but as csv:

Name;LastSyncTime;Estimated Completion Time

i'm aware of the -query option for nas_fs and other commands but I don't find something equal for replications.

thx4help and suggestions.

  • Rainer_EMC

    6 Operator

    •

    8645 Posts

    264

    0

    Posted December 5th, 2013 04:00

    There is an undocumented “nas_replicate –report” option

    Maybe that helps ☺

    Rainer

  • sluetze

    2 Intern

    •

    300 Posts

    264

    0

    Posted December 5th, 2013 05:00

    Hi Rainer,

    thanks a lot! Worked like a charm. i can cut me my infos out of this.

  • Rainer_EMC

    6 Operator

    •

    8645 Posts

    264

    0

    Posted December 5th, 2013 05:00

    You’re very welcome

    For other nas_ commands check the –query option

  • sluetze

    2 Intern

    •

    300 Posts

    264

    0

    Posted December 5th, 2013 05:00


    to make it complete:

    my wished output could be created by

    nas_replicate -report |cut -d, -f2,20,27