The SnapMirror audit log provides a running log of SnapMirror relationships. It shows starting, restarting, and ending information for each SnapMirror relationship. This script reads in the log file(s) and parses the information into a usable CSV or XLSX file. The output produces the following details:
Source (the source of the SnapMirror relationship)
Destination (the destination of the SnapMirror relationship
Type (request, start, or end)
KB Transferred (produced only for end type entries)
Time Stamp (the time stamp associated with the log file entry)
Duration (recorded in seconds)
Throughput (in KB/s)
Concurrency (number of total SnapMirrors transferring during any part of the time this SnapMirror was transferring)
The similar 7-mode parser script can be found here:
Thanks for all the feedback. Take a look at the new version I just posted. I think it addresses the issues you were experiencing. Also, I added a new option to export to Excel format (requires a module, described in the comment section).
Make a quick update today. Changed the throughput calculation based upon the time the SnapMirror is actually running instead of the time from when it was requested. Should give a better picture of actual throughput.
I had a request to add a "concurrency" field to show the number of other SnapMirror transfers that were transferring during the time that particular SnapMirror transfer was transferring. I added that to this most current version.
P.S. If you aren't using the export to Excel parameter, you really should consider it. Really presents the data more easily to work with. It just takes the module to be installed that is mentioned in the help comments.
This is pretty great - thank you so much! A couple of questions.
The CSV outputs multiple lines for the same job, since any given snapmirror job is set to kick off at least once per day. Is there any way to account for date and time-stamps?
A significant number of the jobs list a negative request-to-end, and therefore throughput; e.g., -2681.01934 KB/s. This only seems to happen if a job's start time is toward the end of the day (say, around 23:00), and finishes sometime the next day (say, around 03:00)
A given job might start on one day, but not finish until several days later, because networking or size of the job or any number of other reasons. Is it possible to account for that?
Thanks so much for your hard work on this one. I'm in the beginning stages of learning PowerShell, so your script is quite an education, but some parts are definitely outside of my current knowledge level.