Skip to content

Logit Blog

Menu
  • Home
  • Tooling
  • About

Extract login times from Login VSI

November 27, 2018 Author: Ryan Ververs-Bijkerk

The login time is a key metric that has a big effect on the user experience. The login times are often included in service-level agreements to ensure a good user experience. When applying changes in your environment you want to avoid increasing login times. With Login VSI you can extract the login times from the data. This blog post will show how to extract the login times from Login VSI into raw CSV data.

Please note: this blog post expects some basic knowledge of the product Login VSI. More information about Login VSI can be found here.

Login process from a Login VSI perspective

It’s important to understand the login process from a Login VSI perspective. The Login VSI login process contains three stages:

  1. Launched;
  2. Logon;
  3. Active.

Launched

Once the test is started the Launcher will establish a user session. Before starting the configured connector, a file will be written on the share on the following location: “[VSIShare]\_VSI_LogFiles\[ActiveTest]\Monitor\LaunchedSessions\”. In this location, text files are created that contain basic information, including the launcher name and username.

Logon

With a default deployment of Login VSI a login script is used to start the engine in the desktop. Once the engine is started in the login mode another file is created on the share: “[VSIShare]\_VSI_LogFiles\[ActiveTest]\Monitor\Logon\”. This text file contains the username and desktop name.

Active

By default, the engine will exit the logon mode and restarts in active mode. Active mode is where the engine will execute the workload. Again another file is created but this time in the following folder:  “[VSIShare]\_VSI_LogFiles\[ActiveTest]\Monitor\AcitveSessions\”. These text files also contain the username and desktop name.

The time between launched and active is the total login time which includes brokering, group policy processing, user profile loading etc. Based on these files the total login time can be extracted. Some files contain timestamps. It is recommended to use the last write or creation timestamps of the file server to get accurate results. Time drifting may occur when using timestamps from various machines.

The script

Before starting it is important to understand the times are based on the last write time of the file. Moving the files to another location will influence the results.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$testNameFilter = "Name_of_the_test"
$tests = Get-ChildItem -Path "\\server\VSIShare\_VSI_LogFiles"  | Where-Object {$_.Name.StartsWith($testNameFilter)}
 
 
foreach ($test in $tests) {
 
$testPath = $test.FullName
 
$userLogons = @()
$files = Get-ChildItem "$testPath\Monitor\LaunchedSessions\*.txt"
foreach ($file in $files) {
$match = $file.name.Replace(".txt","") -match '(?<=\##)(.*?)(?=_#)'
if($match) {
$userID = $Matches[0]
 
$activeFiles = Get-ChildItem "$testPath\Monitor\ActiveSessions\$userID*.log"
 
foreach ($fileActive in $activeFiles) {
 
if($fileActive.name.Split('@')[0] -eq $userID) {
 
$item = New-Object PSObject    
$item | Add-Member Noteproperty DateTime $file.LastWriteTime.ToString('MM/dd/yyyy HH:mm:ss')                      
$item | Add-Member Noteproperty User $userid
$item | Add-Member Noteproperty LogonTime ($fileActive.LastWriteTime - $file.LastWriteTime).TotalSeconds
 
$userLogons += $item
}
}
}
}
 
$match = $test.Name -Match "(\d+)(?!.*\d)"
$number = $matches[0]
$name = $test.Name.TrimEnd($number) + "Logon_" + $number
 
$userLogons | Sort-Object DateTime | Export-Csv "$testPath\$($name).csv" -NoTypeInformation
}

The login times are based on the launched and the active file. The information is saved within an object including the launched time, username and total login time which is added to an array. At the end of the script, the array is exported to a CSV located in the test directory. The following screenshot shows the results. Please note I have added the chart myself, this is not done by the script.

Conclusion

The login time is an important metric which is often included in a service-level agreement. It is possible to extract the login times from the Login VSI results using a simple script. This is valuable information to validate if a change to the environment has an impact on the login times. If you have any comments or questions please leave them below.

Credits to Dennis Geerlings from Login VSI that provided a base for the script.

 

Photo by Aron on Unsplash

 

 

Share this on:

  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Google+ (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to email this to a friend (Opens in new window)
  • Click to print (Opens in new window)
Posted in Login VSITagged Citrix, Login VSI, Microsoft, Powershell, VMware

Follow me

My latest tweets

RT @_JeremyMain: At last, #GPUProfiler v1.07 has been released for physical and virtual machines featuring #NVIDIAvGPU. New features: Multi…

Looks like I have broken @Citrix Virtual Desktops 1811.1 in the @ict__r lab environment and had to move back to ver… https://t.co/k5YKEF5UXp

RT @Rorymon: Brand new episode of the @5bytespodcast is now available, it covers a major Linux & macOS malware, a VMware Acquisition, a 201…

RT @Rorymon: The @5bytespodcast is also available on audio only platforms like SoundCloud, Google Podcasts, Apple Podcasts and Spotify to n…

RT @Rorymon: To never miss an episode of the podcast, subscribe on your platform of choice and turn on notifications. ¦

RT @MartinZugec: The more the merrier... https://t.co/rEObZNuyGg

RT @cstalhood: Performance difference between user profiles < These results are not as expected and show a roaming user profile is the best…

RT @MartinZugec: Another great research by @ict__r confirms what we've been seeing as well. While mandatory profiles provided a boost to p…

RT @ict__r: Performance difference between user profiles by @Logitblog https://t.co/iAMJazpNsA #Microsoft #Win10

Performance difference between user profiles https://t.co/1oEOiPHlF1 #Microsoft #Win10

Ga jij ook naar de #DuCUG? Stem dan op de volgende sessie "Without data you're just another person with an opinion"! @DuCUG #Citrix @ict__r

Categories

2020 Agile App-V Bot Citrix Containers CSI Desktop Strategy Development EUC Flex+ FRAME Immidio Login PI Login VSI NVIDIA Packaging Powershell Project VRC RES SCCM Test Tools Troubleshooting VDI VMware Windows 7 Windows 8 Windows 10 WordPress

Archives

  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Disclaimer

The views/opinions expressed on this site are strictly mines or of any guest bloggers and not the opinions and views of my current and previous employers.

Other Blogs

  • Agile Teams Work
  • Develop Now
  • Geursen.net
  • Sonny Puijk
  • The knack
  • Virtual Vibes

Other Blogs

  • Aaron Parker
  • Bram Wolfs
  • Dan Gough
  • Rory Monaghan
  • Timothy Mangan

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 440 other subscribers

Copyright © 2019 Logit Blog. All Rights Reserved.
Screenr parallax theme by FameThemes
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.