login vsi company logo login vsi company logo 250x40

Troubleshooting with Process Monitor and Login VSI

Troubleshooting with Process Monitor and Login VSI

Troubleshooting with Process Monitor and Login VSI is a powerful combination. When troubleshooting a problem, you often want to reproduce the same behavior. This is possible with the workload customization in Login VSI. With tools like Process Monitor you can identify problems which can help you find the root cause. In this blog post I will provide an example how to integrate Process Monitor in Login VSI.

Why is this useful with Login VSI?

Login VSI simulates users on a virtual desktop infrastructure (VDI) or remote desktop session host (RDSH/SBC) environment. 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 Process Monitor 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 Process Monitor with Login VSI

With Process Monitor you can monitor application behavior on file system- and registry-level. For more information and the download please visit the Microsoft website. Process Monitor can be run by the command line and therefore it is simple to use in a Login VSI workload.

Please note: Process Monitor requires administrative privileges.

Process Monitor on the VSIshare

The first step is to download Process Monitor. After downloading Process Monitor browse to the following location “{VSIshare}\_VSI_Binaries\Target\Lib” and create a directory “Procmon”. Copy the downloaded Process Monitor executable to the “Procmon” directory. This way Login VSI will copy Procmon.exe when a Login VSI user logs on.

  process monitor create directory   process monitor copy

Process Monitor integration in the workload

The next step is to integrate Process Monitor in the workload. First we need to know which parameters we need to use. This can be done by running Process Monitor from the command line with the /? parameter.

process monitor usage parameters

To start a trace we can use the following command line:

Procmon.exe /AcceptEula /Quiet /Minimized /BackingFile “C:\Example.pml”

Within the workload we use the VSI_ShellExecute command to start Process Monitor. For all the Login VSI meta language commands please visit the documentation.

VSI_ShellExecute("Procmon", "%temp%\VSI\Runtime\Lib\Procmon\Procmon.exe", "/AcceptEula /Quiet /Minimized /BackingFile %systemdrive%\%computername%-Procmon.pml")

After we started a trace you need to add the application you want to troubleshoot. To stop the Process Monitor trace we have to add the following command to the workload.

VSI_ShellExecute("Procmon", "%temp%\VSI\Runtime\Lib\Procmon\Procmon.exe", "/Terminate")

With two simple commands in a workload we are able to collect a Process Monitor trace. For a full example I’m using the eDrawings workload created in a previous blog post. Before we start using the application we start a Process Monitor trace. When we are finished with the application we stop the trace.

#WLProp:Version#1.0.1
#WLProp:Date#2013-12-12
#WLProp:Description#The eDrawing Procmon Workload
##### Start segment Prepare
Segment("Workload", "Prepare")
# Skip eDrawing registration screen
VSI_RegWrite("Workload", "HKEY_CURRENT_USER\Software\eDrawings\e2014\General", "Activated", "REG_DWORD", "1")
# 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 - eDrawing + Procmon               #####
##############################################################
Segment("Workload", 1)
# Start Procmon Trace
VSI_ShellExecute("Procmon", "%temp%\VSI\Runtime\Lib\Procmon\Procmon.exe", "/AcceptEula /Quiet /Minimized /BackingFile %systemdrive%\%computername%-Procmon.pml")
VSI_Random_File_Copy("eDraw1", "EASM", "%VSI_Userhome%\EASM1.easm")
App_Start("eDraw1", "", "%VSI_Userhome%\EASM1.easm", "Title", "eDrawings")
App_Focus("eDraw1", "Title", "eDrawings", "", "Maximize")
VSI_Type_Fixed("eDraw1", "{left}{left}{left}{left}{left}{left}")
VSI_Type_Fixed("eDraw1", "{down}{down}{down}{down}{down}{down}")
VSI_Type_Fixed("eDraw1", "{left}{left}{left}{left}{left}{left}")
VSI_Type_Fixed("eDraw1", "{down}{down}{down}{down}{down}{down}")
VSI_Type_Fixed("eDraw1", "e")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "e")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
App_Close("eDraw1", "Title", "eDrawings")
# Stop procmon trace
VSI_ShellExecute("Procmon", "%temp%\VSI\Runtime\Lib\Procmon\Procmon.exe", "/Terminate")

Conclusion

With two simple commands we can create a Process Monitor trace which we can use to troubleshoot a specific or more applications on multiple targets. This way you can use Login VSI to reproduce the exact same behavior in an application while Process Monitor captures all the information. It is an efficient way to minimize the trace size and capturing only the duration when the application is used.

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

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