Why to have detailed logon information from Citrix?
Sometimes anyone is asking you, the performance is not what we like. Within a Citrix environment it is easy to get into the director to see the overview of the logon times.
By default Citrix Director gives the following information about the logon:
However average is a good indication, average is not always the best method to measure something. Digging in to the numbers can be needed to get the exceptions clear.
This blog will shortly explain how to get more detailed information from your database.
What kind of results do you get?
My final report shows the following:
This gives more detailed information about how long users need to wait for a logon. The data in this graph is based on the field InteractiveDesktop from the query below.
But also any table with detailed information can be made. Or query on user, query on VDI name, e.g.
My baseline tools
I used the following tools to create this graph:
- Microsoft Excel
- SQL Server Management Studio
The results of the query in SQL Server Management Studio can easily copied into Excel. With Pivot tables you can create this kind of graphs.
When you run the following query on the Monitoring Database it will give a lot of output.
/* Citrix Director only gives Average information about logon.
This query gives detailed and calculated information about the logontimes. */
/****** Script for SelectTopNRows command from SSMS ******/
SELECT LogonDuration = DATEDIFF(Second, [LogOnStartDate], [LogOnEndDate])
,GpoDuration = DATEDIFF(Second, [GpoStartDate], [GpoEndDate])
,InteractiveDesktop = DATEDIFF(Second, [BrokeringDate],[InteractiveEndDate])
,FORMAT([BrokeringDate] , 'dd-MM-yyyy') AS EasyDate
,FORMAT([BrokeringDate] , 'HH') AS EasyHour
,[Name] AS VM
LEFT JOIN [MonitorData].[Session]
ON ([MonitorData].[Connection].[SessionKey] = [MonitorData].[Session].[SessionKey] )
LEFT JOIN [MonitorData].[Machine]
ON ([MonitorData].[Session].[MachineId] = [MonitorData].[Machine].[Id])
WHERE Convert(date,[LogOnStartDate]) = Convert(date,GETDATE())
AND [IsReconnect] = 0
Citrix is logging a lot of information in the database, but unfortunately the Director is not showing the information. With SQL query’s there are a lot of options to query this information.
All details about the values in the database can be found here: support.citrix.com
Depending on the Citrix license which is purchased, more or less information is stored in the database. Please keep in mind that old records in the database will be cleared automatically. So make you’re report on time, or create something to save the data.