Troubleshooting with XPerf and Login VSI

05 Apr 2014 by Ryan Ververs-Bijkerk

Category:

    Login VSI

Troubleshooting with XPerf and Login VSI

Table of Content

  • What is XPerf?
  • Using XPerf with Login VSI
  • XPerf on the VSIshare
  • Integration in the workload
  • Running the workload
  • Conclusion

With 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 to other tools like XPerf. In this blog post I will explain how to integrate XPerf in a Login VSI workload to troubleshoot an issue.

Please note: This is a personal blog and  not an official Login VSI blog post.

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.

Please note: A Login VSI PRO license is required for workload customization. For more information please visit the Login VSI website

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-ADK-Setup

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 recommend.

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-VSI_Lib

Paste the copied files.

Xperf-VSI_Lib2

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.

http://msdn.microsoft.com/en-us/library/hh162920.aspx

In this example where 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 where going to idle for 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 were are going to stop the trace. In this example were 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 Logitblog 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.

If you have any comments or question please leave a comment below.

Tags:
    login vsi
    performance toolkit
    troubleshooting
    xperf
Ryan Ververs-Bijkerk
Written by Ryan Ververs-Bijkerk

Ryan is a self-employed technologist at GO-INIT who specializes in the EUC and code area. He primarily focuses on the user experience in centralized desktop environments.

Search

    Follow me

    Community