login vsi company logo login vsi company logo 250x40

Troubleshooting with XPerf and Login VSI

Troubleshooting with XPerf and Login VSI

By integrating XPerf in a Login VSI workload, you can get valuable information to troubleshoot a problem in your environment. In a previous blog post I described how to integrate Process Monitor in a Login VSI workload. This can also be done with other tools like XPerf. In this blog post I will explain how to integrate XPerf in a Login VSI workload to troubleshoot an issue.

What is XPerf?

XPerf is a powerful tool that helps with overall system performance analysis. For more information I recommend to read this blog post.

Why is XPerf useful with Login VSI?

Login VSI simulates users on a virtual desktop infrastructure environment (VDI) or a remote desktop session host environment (RDSH/SBC). Because Login VSI has simple workload customization you can quickly create a workload with a specific application that contains a problem. For troubleshooting you can add XPerf to get to the bottom of what the application is doing while Login VSI is using the application. By reproducing you can apply changes and rerun the workload to verify if the problem is solved. Because Login VSI can integrate in a production environment you are able to troubleshoot on a single target machine during office hours.

Using XPerf with Login VSI

XPerf is part of the Windows Assessment and Deployment Kit and can be downloaded here. Run the ADKsetup and download the installers.

xperf assessment and deployment kitsetup

XPerf on the VSIshare

The best location to store the XPerf binaries is the VSIshare. We can use the default Login VSI mechanism to copy XPerf to your target machine.

NOTE: Running XPerf from the VSIshare is possible but not recommended.

When the installers are downloaded you can install the WPTx86-x86_en-us.msi or WPTx64-x86_en-us on a machine to install XPerf.

xperf wpt installers

Copy the files in the “C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit” directory. Probably not all files are required but I’m not sure which are so therefore I copied all files.

xperf wpt installed

To get XPerf on all the target machines we are going to create a directoy in the target libary. This way the files are copied when the Login VSI user logs on

Browse to the VSIshare and create a direcoty called XPerf in the following location: {VSIshare}\_VSI_Binaries\Target\Lib\

xperf lib

Paste the copied files.

xperf lib 2

Integration in the workload

XPerf is now copied on the target machine by the Login VSI logon script and can be used in the workload. In this example we are going to start XPerf, idle and stop the trace. Please use the command line reference for the correct trace.

In this example we are going to use the following command:

xperf -on DiagEasy+FILE_IO_INIT+REGISTRY

Because XPerf is not installed on the target machine we need to make sure the full path is used. The Login VSI command is as followed:

VSI_ShellExecute("XPerf", "%temp%\VSI\Runtime\Lib\Xperf\xperf.exe", "-on DiagEasy+FILE_IO_INIT+REGISTRY")

In this example we are going to idle for some amount of time. I’m using the Workload_Idle command which will display a message the XPerf trace is running.

Workload_Idle("XPerf", 600, "Running XPerf trace", 1)

Finally we are are going to stop the trace. In this example we are going to save the trace on the systemdrive in the Xperf directory. The file will contain the computer name so you can identify the trace file.

VSI_ShellExecute("XPerf", "%temp%\VSI\Runtime\Lib\Xperf\xperf.exe", "–d %systemdrive%\Xperf\%computername%-Xperf.etl")

After the trace is done the Login VSI user can logoff.

VSI_LogOff()

Running the workload

When starting a Login VSI test with the XPerf workload you will collect the Xperf date. This data can be used to troubleshoot a problem.

Complete XPerf workload:

#WLProp:Version#1.0.0
#WLProp:Date#2014-04-04
#WLProp:Description#The XPerf Workload
##### Start segment Prepare
Segment("Workload", "Prepare")
 
# Random wait before starting workload
Workload_RandomIdle("Workload", 5, %VSI_RandomInitialWait%, "Waiting to start workload")
 
# Set mouse position
VSI_Mouse_Position("Workload")
 
##############################################################
##### Start segment 1 - XPerf                        #####
##############################################################
Segment("Workload", 1)
 
# Start XPerf Trace
VSI_ShellExecute("XPerf", "%temp%\VSI\Runtime\Lib\Xperf\xperf.exe", "-on DiagEasy+FILE_IO_INIT+REGISTRY")
 
# XPerf Idle
Workload_Idle("XPerf", 600, "Running XPerf trace", 1)
 
# Stop XPerf Trace
VSI_ShellExecute("XPerf", "%temp%\VSI\Runtime\Lib\Xperf\xperf.exe", "–d %systemdrive%\Xperf\%computername%-Xperf.etl")
 
# Logoff action
VSI_LogOff()

Conclusion

The combination of Login VSI and XPerf is perfect to troubleshoot a specifc problem. With the easy workload customization of Login VSI you can reproduce the problem over and over again. This way you can apply changes and verify if the problem is solved. With the detailed information from XPerf you have valuable information to find the cause of the problem.

This blog was originally published on Logit Blog.

About the author

Ryan Bijkerk (@Logitblog) is a Product Owner at Login VSI and a Microsoft MVP on Application Virtualization (App-V) technology. He is also involved in the independent research Project VRC and speaks at events. Besides working, Ryan enjoys writing for his blog and riding his MTB.


Tags: How-to, Login VSI

Popular Blogs

Login VSI - Press Release - Login VSI Releases Login Enterprise 4.0

[Press Release] Login VSI Releases Login Enterprise 4.0

Login VSI Releases Login Enterprise 4.0 New Application Load Testing Functionality Maximizes End-User Experience Continue Reading
Login VSI and Ymor Form Partnership to Deliver Performance Improvement to Business-Critical Applications

[Press Release] Login VSI and Ymor Form Partnership to Deliver Performance Improvement to Business-Critical Applications

The partnership offers a total solution for enterprise organizations to monitor and test business-critical applications from end-to-end via VDI or in the Cloud. Ymor offers various monitoring solutions, used to test and monitor the performance of critical business chains from end-to-end. In VDI environments, Ymor can now offer the monitoring solutions of Login VSI. Continue Reading
Login VSI Releases Login Enterprise 4.1

[Press Release] Login VSI Releases Login Enterprise 4.1

Login VSI Releases Login Enterprise 4.1 Comprehensive Testing Platform Ensures Business Continuity Continue Reading
Login VSI - Blog - Windows 10 1909 - Performance Results Windows 10 - 1909

Windows 10 – 1909 performance results and a look ahead at 2004

Is it just me or does Windows 10 2004 just not feel right as a name? Regardless of my opinion on that, Microsoft will release this 20H1 build in April of this year. But most organizations today are not going to implement this new version right away. Market research by VDI Like a Pro shows that most enterprises today are running Windows 10 1803, or 1809. Continue Reading
Login VSI Blog - Login VSI Results for HPE SimpliVity 325

Login VSI results for HPE SimpliVity 325

Congratulations to HPE SimpliVity for another successful validated by Login VSI achievement! This latest hyperconverged (HCI) result is based on the HPE SimpliVity 325 platform leveraging 2nd Gen AMD EPYC processors. Continue Reading
Login VSI - Validating Your Remote Infrastructure at Scale - Man at Desk

Enabling Your Remote Workforce

Given recent global events, a majority of my users may need to work remotely. Many of our customers have been asking us if we can help them test the user-experience for their remote workforce, as well as the infrastructure that delivers it. We have seen requests range from the quality of the remote user-experience to the ability of their VPN to handle the throughput of a large volume of concurrent connections. Continue Reading