Export List of Hard Disk Read Times

PowerShell script exchange

Export List of Hard Disk Read Times

Veeam Logoby Jack1874 » Fri Oct 23, 2015 2:20 pm 1 person likes this post

Guys, is there a way to export out the statistics of a job that shows the Hard disk read time ?

I seen this code for extracting the Removing Snapshop Statistic.. and wondered if the hard Disk read time can be substituted ..

Code: Select all
$Jobs = Get-VBRJob -Name "Job*"
foreach ($Job in $Jobs) {
   $LastSession = $Job.FindLastSession()
   $TaskSessions = $LastSession | Get-VBRTaskSession
   foreach ($vm in $TaskSessions) {
      $asd = $vm.Logger.GetLog().UpdatedRecords | where-object {$_.title -eq "Removing VM snapshot"} | Select-Object title, starttime,

updatetime
      $diff = $asd.updatetime - $asd.starttime
      Write-Host $vm.Name `t $diff.TotalMinutes
   }
}
Jack1874
Enthusiast
 
Posts: 88
Liked: 4 times
Joined: Sat Oct 17, 2015 3:32 pm
Location: Canada
Full Name: Stuart Little

Re: Export List of Hard Disk Read Times

Veeam Logoby jbennett » Wed Oct 28, 2015 2:11 am

What specific statistics are you looking for? MB/s, Latency, etc?
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
jbennett
Enthusiast
 
Posts: 33
Liked: 12 times
Joined: Tue Jun 23, 2015 3:47 pm
Location: Hemet, CA
Full Name: Justin Bennett

Re: Export List of Hard Disk Read Times

Veeam Logoby Jack1874 » Thu Oct 29, 2015 2:19 pm

Hi Justin, I'm looking for the MB/s read for each vmdk within a job.

If I could also export the time it took to run the vmdk copy that would be great too ...

Image
Jack1874
Enthusiast
 
Posts: 88
Liked: 4 times
Joined: Sat Oct 17, 2015 3:32 pm
Location: Canada
Full Name: Stuart Little

Re: Export List of Hard Disk Read Times

Veeam Logoby PTide » Thu Oct 29, 2015 2:35 pm

Hi,

Hi Justin, I'm looking for the MB/s read for each vm within a job

If I could also export the time it took to run the job that would be great too ...

Have you considered using Veeam ONE report for that? I think it is able to do exactly what you are after:
Image
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Export List of Hard Disk Read Times

Veeam Logoby Jack1874 » Thu Oct 29, 2015 5:04 pm

Yes.. I did consider that.. but I wanted them in a spreadsheet where I can make comparisons
Jack1874
Enthusiast
 
Posts: 88
Liked: 4 times
Joined: Sat Oct 17, 2015 3:32 pm
Location: Canada
Full Name: Stuart Little

Re: Export List of Hard Disk Read Times

Veeam Logoby PTide » Thu Oct 29, 2015 6:16 pm

In this case I suggest you to utilize Veeam ONE "Scheduling". Please try the following:

1. Go to "Workspace" in Veeam ONE reporter

2. In "My Reports" create another subfolder, say, "My Jobs Info"

3. Go to Veeam Backup & Replication folder and pick "Backup Job Historical Information". Adjust it as needed and save into your "My Jobs Info" folder you've just created.

4. Go to "My Jobs Info" folder, click "Schedule Folder" button on the toolbar, click "Add" and add your "My Jobs Info" folder. Next specify MS Excel fromat, schedule, recipients.

Your reports excel files will appear in the specified place in accordance with schedule.

I hope this helps.

Thank you.
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Export List of Hard Disk Read Times

Veeam Logoby jbennett » Mon Nov 02, 2015 10:38 pm

Jack1874 wrote:Yes.. I did consider that.. but I wanted them in a spreadsheet where I can make comparisons


Is this what you were thinking?

https://github.com/cajeeper/Veeam/blob/master/Get-LastJobVMStats.ps1

Image
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
jbennett
Enthusiast
 
Posts: 33
Liked: 12 times
Joined: Tue Jun 23, 2015 3:47 pm
Location: Hemet, CA
Full Name: Justin Bennett

Re: Export List of Hard Disk Read Times

Veeam Logoby Jack1874 » Tue Nov 03, 2015 11:18 pm

That is perfect ....

I get this message when I run it ...

Image
Jack1874
Enthusiast
 
Posts: 88
Liked: 4 times
Joined: Sat Oct 17, 2015 3:32 pm
Location: Canada
Full Name: Stuart Little

Re: Export List of Hard Disk Read Times

Veeam Logoby jbennett » Wed Nov 04, 2015 1:07 am

Jack1874 wrote:That is perfect ....

I get this message when I run it ...

Image


I thought I published the update - try the latest version. It has to do with putting a dash in the variable name.

https://github.com/cajeeper/Veeam/blob/master/Get-LastJobVMStats.ps1
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
jbennett
Enthusiast
 
Posts: 33
Liked: 12 times
Joined: Tue Jun 23, 2015 3:47 pm
Location: Hemet, CA
Full Name: Justin Bennett

Re: Export List of Hard Disk Read Times

Veeam Logoby Jack1874 » Wed Nov 04, 2015 2:50 pm

That works great...

Do you know if its possible to list the actual MB/s read from each individual VMDK (within in guest)?
Jack1874
Enthusiast
 
Posts: 88
Liked: 4 times
Joined: Sat Oct 17, 2015 3:32 pm
Location: Canada
Full Name: Stuart Little

Re: Export List of Hard Disk Read Times

Veeam Logoby jbennett » Mon Nov 09, 2015 5:11 pm

I'm not seeing a way to pull that level of detail from PowerShell.

When I'm digging around the Job's TaskSession information and I'm not finding VMDK or VHD specific details. Only the overall progress information.

Image

Image
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
jbennett
Enthusiast
 
Posts: 33
Liked: 12 times
Joined: Tue Jun 23, 2015 3:47 pm
Location: Hemet, CA
Full Name: Justin Bennett

Re: Export List of Hard Disk Read Times

Veeam Logoby v.Eremin » Mon Nov 09, 2015 8:03 pm 1 person likes this post

Since this information is present inside the task session reflected in GUI, it should be possible to get it from log. Something like:

Code: Select all
$TaskSession.logger.getlog().updatedrecords


Thanks.
v.Eremin
Veeam Software
 
Posts: 13291
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Export List of Hard Disk Read Times

Veeam Logoby jbennett » Mon Nov 09, 2015 9:08 pm

I've added the hard disk details (thanks to v.Eremin) as a string output of all disks from the log. I could break it out in an array if needed - it just becomes complicated with only having the formatted output and prerounded data elements (B / KB / MB / GB / TB / ETC). Would need the bytes to accurately output.

https://github.com/cajeeper/Veeam/blob/master/Get-LastJobVMStats.ps1

Image

Thank you!
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
jbennett
Enthusiast
 
Posts: 33
Liked: 12 times
Joined: Tue Jun 23, 2015 3:47 pm
Location: Hemet, CA
Full Name: Justin Bennett

Re: Export List of Hard Disk Read Times

Veeam Logoby Jack1874 » Tue Nov 10, 2015 7:51 pm

Pretty much perfection ...

Is it possible to list out the the Disk Details Hard Disk 1 , 2 , 3 .. etc

Image
Jack1874
Enthusiast
 
Posts: 88
Liked: 4 times
Joined: Sat Oct 17, 2015 3:32 pm
Location: Canada
Full Name: Stuart Little

Re: Export List of Hard Disk Read Times

Veeam Logoby v.Eremin » Tue Nov 10, 2015 8:44 pm

Not sure whether I get your question. So, I'm still wondering how the "disk details" parameter should re-formatted. Can you probably show a string or something? Thanks.
v.Eremin
Veeam Software
 
Posts: 13291
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Next

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests