Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 246286

Re: Disk performance realtime, averrage on nas server

$
0
0
$esxName = Get-vmhost 192.168.1.20, 192.168.1.33
$esxImpl = Get-VMHost -Name $esxName
$todayMidnight = (Get-Date -Hour 0 -Minute 0 -Second 0).AddMinutes(-1)
$workingDays = "Monday","Tuesday","Wednesday","Thursday","Friday"
$dayStart = New-Object DateTime(1,1,1,7,00,0)     # 07:30 AM
$dayEnd = New-Object DateTime(1,1,1,18,05,0)      # 05:30 PM
$stats = Get-Stat -Entity $esxImpl -Stat disk.deviceLatency.average -Start $todayMidnight.AddDays(-17) -Finish $todayMidnight.AddDays(-1)
$report = $stats | Where-Object {
$workingDays -contains $_.Timestamp.DayOfWeek -and
$_.Timestamp.TimeOfDay -gt $dayStart.TimeOfDay -and
$_.Timestamp.TimeOfDay -lt $dayEnd.TimeOfDay
}
$report | Export-Csv "C:\scriptvm\GAVG\GAVG.csv" -NoTypeInformation -UseCulture

 

 

Hi

 

 

here my script

 

 

all works except export when date is more than 18 days. when i export from -17 to -1 it's work all data are on my file but if i try more than 17... nothing... my file is empty

 

 

i try  Get-Stat -Entity $esxImpl -Stat disk.deviceLatency.average -Start 01/12/2012 -Finish 20/01/2013 on shell and data are display.

 

 

do you know why ?

 

 

tks advance


Viewing all articles
Browse latest Browse all 246286

Trending Articles