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-vdi-performance-summit

The VDI Performance Summit - Virtual Conference and Expo

Visit the VDI Performance Summit to gain knowledge and experience about performance and tuning VDI, improving End-User Experience and IT service. Join us at the ONLY virtual event 100% dedicated to VDI performance and tuning | May 2, 2019 This 1-day event offers key-notes presented by the best VDI performance experts in the world, technical and business oriented breakout sessions, the possibility to chat with experts directly to discuss your own situation, and a virtual exhibit hall featuring… Continue Reading

Scalability testing Parallels Remote Application Server with Login VSI

Recently I went to VMworld in Barcelona where Login VSI had a booth on the expo... While I can’t remember exactly how many conversations I had - there had been so many that I lost my voice on day one. What was new this year is that quite a few people asked if our software is compatible with the solutions from Parallels specifically their Remote Application Server (RAS) (Datasheet). Continue Reading
Login VSI Blog Article - Microsoft Windows 10 Default FTA Associations - Teaser Image

Windows 10 Default File Type Associations and Login VSI

When Login VSI 4.1 was released, the majority of desktops were running Windows 7 and life was easy. We’d set the default filetype for an application and it would simply work. The default and industry standard workloads in Login VSI include launching and using Adobe Reader as part of the virtual user simulation. Because Login VSI doesn’t always know which version of Adobe Reader is installed, or where it’s installed, the workload relies on the file type association (FTA) for .pdf documents to be… Continue Reading
Login VSI - Press Release - IGEL - Login VSI Partner to Optimize End User Computing Experience Image

[Press Release] IGEL Partners with Login VSI to Optimize the End User Computing Experience

Login PI enables organizations to better protect the performance and availability of their IGEL OS-powered virtual desktop environments San Francisco, USA, Feb. 6, 2019: IGEL, a world leader in software-defined endpoint optimization and control solutions for the secure enterprise, today announced that it is partnering with Login VSI, provider of software solutions to test and actively monitor the performance and availability of virtual desktop environments, including VDI and… Continue Reading
Login VSI - Blog - Login PI Blog Teaser Image - Windows Virtual Desktop: How To Monitor User Experience With Login PI

Windows Virtual Desktop – How to Monitor User Experience?

Microsoft has just announced the public preview of their new Windows Virtual Desktop (WVD) offering at Microsoft Ignite on Tour in Amsterdam today. For those of you who’ve not followed the rumors or the private beta, here’s the outline... Continue Reading
Investigating Online Application Performance with Login PI

Investigating Online Application Performance with Login PI

As many companies do, we use a CRM system. Recently, I have been getting complaints about our cloud CRM system, Microsoft Dynamics, being slow. I tried to investigate this by shadowing one of our users to see what was wrong. As expected, everything was fast. 15 minutes later, the same user reported slowness again. How could I investigate this without bothering the users? Continue Reading
Cookie Settings