Collecting PCoIP Performance Statistics on Horizon View Desktops

I've had the pleasure of setting up several Horizon View deployments, and for the most part they've gone smoothly.  One thing I ran into recently was occasional poor performance of the keyboard and mouse on a View Client session.  The user would type some characters or move their mouse, and the display would lag behind by a few seconds.  Also, USB redirection would sometimes fail including audio redirection to a USB headset.  There were no obvious resource constraints on the View implementation, and my testing from a remote site didn't reveal any performance issues.  Things looked to be related to the network that the clients were connecting from.  I wanted to gather some performance data to bring to the network team, so I used the PowerShell Cmdlets from View.  It seems like a pretty useful thing to do, so I scripted it out.  The script is beyond the jump along with some clarification.

The script is written to run against either a single pool in Horizon View, or all pools.  It takes each VM in the pool and attempts to use WMI to collect performance data on PCoIP session statistics.  The data is exported as a CSV file, and the top 10 RX and TX packet loss VMs are displayed on the screen for quick reference.  It also produces a log file of it's actions and errors encountered.  You can tell it where you want both the CSV and log files to be written using the -logfilelocation and -csvfilelocation parameters.  I've published the script on Gist and embedded it here so you'll see the latest in case I change anything.

Labels: , , , ,