Tuesday, October 6, 2015

Citrix Provisioning Server performance

Powershell Script to measure Citrix Provisioning Server performance

Change SMTP Server Name, Sender Email ID and Recevier Email ID

Save the below mention script  with .ps1 extension and run it from PVS server

# Sample interval 5 minutes

echo "The Copy Read Hits % is the counter that tells you what percent of read I/O being served is coming from system cache, not disk." > load.txt
echo "The higher the number is better" >>load.txt


Get-Counter "\cache\copy read hits %" -SampleInterval 300 | select -ExpandProperty countersamples | select -ExpandProperty cookedvalue | Measure-Object -Average -Maximum -Minimum >> load.txt

echo "The I/O Data Operations/sec counter is the counter that tells you how much I/O is being generated by StreamProcess.exe" >>load.txt
echo "This number will vary by environment, so take various baselines in your environment to figure out what a “healthy” number is for you" >>load.txt

Get-Counter "\Process(StreamProcess)\IO Data Operations/sec" -SampleInterval 300 | select -ExpandProperty countersamples | select -ExpandProperty cookedvalue | Measure-Object -Average -Maximum -Minimum >> load.txt

$load = get-content .\load.txt |out-string

Send-MailMessage -To "RECEIVER EMAIL" -Subject "Citrix Provisioning Server performance - Test PVS server (HostName) " -Body "\cache\copy read hits % in the past 5 minutes was $load" -SmtpServer "SMTP SERVER NAME" -From "SENDER EMAIL"


Get-Counter "\Process(StreamProcess)\IO Data Operations/sec"