PowerShell script exchange
			
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  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
   }
}
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								jbennett 							 
						Enthusiast 			
		Posts:  33Liked:  12 times Joined:  Jun 23, 2015 3:47 pmFull Name:  Justin BennettLocation:  Los Angeles, CA
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by jbennett  Oct 28, 2015 2:11 am 
				
			
			
			
			What specific statistics are you looking for? MB/s, Latency, etc?
			
			
									
						
							-Justin
			
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  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 ...
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								PTide 							 
						Product Manager 			
		Posts:  6595Liked:  805 times Joined:  May 19, 2015 1:46 pm
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by PTide  Oct 29, 2015 2:35 pm 
				
			
			
			
			Hi,
Hi Justin, I'm looking for the MB/s read for each vm within a job
Have you considered using Veeam ONE report for that? I think it is able to do exactly what you are after:
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  Oct 29, 2015 5:04 pm 
				
			
			
			
			Yes.. I did consider that.. but I wanted them in a spreadsheet where I can make comparisons
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								PTide 							 
						Product Manager 			
		Posts:  6595Liked:  805 times Joined:  May 19, 2015 1:46 pm
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by PTide  Oct 29, 2015 6:16 pm 
				
			
			
			
			In this case I suggest you to utilize Veeam ONE "Scheduling". Please try the following:
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								jbennett 							 
						Enthusiast 			
		Posts:  33Liked:  12 times Joined:  Jun 23, 2015 3:47 pmFull Name:  Justin BennettLocation:  Los Angeles, CA
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by jbennett  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/ ... MStats.ps1 
-Justin
			
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  Nov 03, 2015 11:18 pm 
				
			
			
			
			That is perfect ....
I get this message when I run it ...
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								jbennett 							 
						Enthusiast 			
		Posts:  33Liked:  12 times Joined:  Jun 23, 2015 3:47 pmFull Name:  Justin BennettLocation:  Los Angeles, CA
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by jbennett  Nov 04, 2015 1:07 am 
				
			
			
			
			Jack1874 wrote: That is perfect ....
I get this message when I run it ...
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/ ... MStats.ps1 -Justin
			
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  Nov 04, 2015 2:50 pm 
				
			
			
			
			That works great...
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								jbennett 							 
						Enthusiast 			
		Posts:  33Liked:  12 times Joined:  Jun 23, 2015 3:47 pmFull Name:  Justin BennettLocation:  Los Angeles, CA
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by jbennett  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.
-Justin
			
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								veremin 							 
						Product Manager 			
		Posts:  20736Liked:  2403 times Joined:  Oct 26, 2012 3:28 pmFull Name:  Vladimir Eremin
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by veremin  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.
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								jbennett 							 
						Enthusiast 			
		Posts:  33Liked:  12 times Joined:  Jun 23, 2015 3:47 pmFull Name:  Justin BennettLocation:  Los Angeles, CA
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by jbennett  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/ ... MStats.ps1 
Thank you!
-Justin
			
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  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
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								veremin 							 
						Product Manager 			
		Posts:  20736Liked:  2403 times Joined:  Oct 26, 2012 3:28 pmFull Name:  Vladimir Eremin
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by veremin  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.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								jbennett 							 
						Enthusiast 			
		Posts:  33Liked:  12 times Joined:  Jun 23, 2015 3:47 pmFull Name:  Justin BennettLocation:  Los Angeles, CA
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by jbennett  Nov 10, 2015 9:21 pm 
				
			
			
			
			Jack, could you give an example of how you think it should look. Like v.Eremin, I'm not sure what you're looking for. 
Jack1874 wrote: Pretty much perfection ...
-Justin
			
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  Nov 10, 2015 10:15 pm 
				
			
			
			
			Was thinking something along the lines of ...  
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  Nov 10, 2015 10:31 pm 
				
			
			
			
			
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								jbennett 							 
						Enthusiast 			
		Posts:  33Liked:  12 times Joined:  Jun 23, 2015 3:47 pmFull Name:  Justin BennettLocation:  Los Angeles, CA
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by jbennett  Nov 10, 2015 10:34 pm 
				
			
			
			
			Jack1874 wrote: Was thinking something along the lines of ...  
You can add Hard Disk 1, Hard Disk 2 columns to the end of the result block like the following:
Code: Select all 
"Hard Disk 1" = (($_.Logger.getlog()).updatedrecords | ? {$_.Title -like "Hard Disk 1*"} | % { ($_.description -split " ")[4]+" "+($_.description -split " ")[5] | out-string } )
"Hard Disk 2" = (($_.Logger.getlog()).updatedrecords | ? {$_.Title -like "Hard Disk 2*"} | % { ($_.description -split " ")[4]+" "+($_.description -split " ")[5] | out-string } )
Only thing is, like I mentioned prior, you're going to get ever changing size per second. Some will read MB/s, some will read KB/s, it'll be all over.
-Justin
			
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Jack1874 							 
						Enthusiast 			
		Posts:  95Liked:  5 times Joined:  Oct 17, 2015 3:32 pmFull Name:  Stuart LittleLocation:  Canada
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by Jack1874  Nov 10, 2015 11:11 pm 
				
			
			
			
			Thanks Justin... I'll check out your suggestion and report back.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								massimoberloffa 							 
						Lurker 			
		Posts:  1Liked:  never Joined:  Feb 19, 2016 9:56 am
				Contact: 
				
			 
				
		 
		
						
					
																		
							
						
									
						Post 
					 
								by massimoberloffa  May 27, 2016 6:19 am 
				
			
			
			
			How can I extract the time "queued" a vm?
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								PTide 							 
						Product Manager 			
		Posts:  6595Liked:  805 times Joined:  May 19, 2015 1:46 pm
				Contact: 
				
			 
				
		 
		
						
					
																			
						
									
						Post 
					 
								by PTide  May 30, 2016 5:06 pm 
				
			
			
			
			How can I extract the time "queued" a vm?
Please check this 
this post 
Thanks
 
		 
				
		
		 
	 
	
	
	
		
		Users browsing this forum: No registered users and 5 guests