sum304: deploying and troubleshooting edgesight
DESCRIPTION
Sum304: Deploying and Troubleshooting Edgesight. Vincent Papoz. Escalation Engineer. October 16, 2012. Agenda. Architecture overview Use case: Troubleshooting slow logon Troubleshooting and resolving Edgesight Performance issues Custom Reporting (SQL objects and where to find data) - PowerPoint PPT PresentationTRANSCRIPT
Sum304: Deploying and Troubleshooting Edgesight
Vincent Papoz
Escalation Engineer
October 16, 2012
© 2012 Citrix | Confidential – Do Not Distribute
Agenda
2
• Architecture overview
• Use case: Troubleshooting slow logon
• Troubleshooting and resolving Edgesight Performance issues
• Custom Reporting (SQL objects and where to find data)
• Question
Architecture Overview
SQL Server
RS Server
Edgesight and Report Server Databases
Edgesight Server
XenApp servers with Edgesight Agent
Endpoints
© 2012 Citrix | Confidential – Do Not Distribute
What does the agent monitor?
• Event-driven data • Process starts/stops, errors and faults• User logon• WinSock connection and HTTP transactions• Windows Event Log• System reboot
• Polled data • System and Process performance metrics
• ICA session data• Session connects/disconnects• Detailed logon and session metrics, virtual channel statistics
• Scheduled data• Drive space calculation• Asset history
© 2012 Citrix | Confidential – Do Not Distribute
End User Experience monitoring
6
• Collects both client Start-up and Server Start-up metrics
• Service running on the XenApp Servers
Use case: Troubleshooting slow logon
© 2012 Citrix | Confidential – Do Not Distribute
© 2012 Citrix | Confidential – Do Not Distribute
© 2012 Citrix | Confidential – Do Not Distribute
© 2012 Citrix | Confidential – Do Not Distribute
© 2012 Citrix | Confidential – Do Not Distribute
Troubleshooting and resolving Edgesight Performance issues
© 2012 Citrix | Confidential – Do Not Distribute
Symptoms
14
• Report Rendering takes forever,
• Payloads are queuing up in the webload directory and are imported very
slowly,
• Servers will not update the Database,
• Nightly maintenance takes a very long time - and possibly eventually fails,
• Grooming error messages are showing up in the console,
• Database data files very large
© 2012 Citrix | Confidential – Do Not Distribute
Cause
15
• Usually a problem with the SQL database
• SQL server out of disk space or too much data to process
• Data processing cannot complete because the Tlog cannot grow
• Data processing is resource intensive and is delayed
© 2012 Citrix | Confidential – Do Not Distribute
Action plan
16
• Assess your reporting requirements
• Analyze the content of the database
• Remove the unwanted data
• Reclaim disk space
• Adjust the collection configuration
© 2012 Citrix | Confidential – Do Not Distribute
Analyzing the content of the database – Step1
17
• Find out the Size of the Edgesight Database data files
SELECT Name AS Logical_Name,
Physical_Name, (size*8)/1024 SizeMB
FROM sys.master_files
WHERE DB_NAME(database_id) = 'EdgesightDBname‘
GO
Logical_Name Physical_Name SizeMB
Edgesight E:\DB\Edgesight.mdf 2500
Edgesight_log E:\DB\Edgesight_log.LDF 45052
Edgesight_FG1_Data E:\DB\Edgesight_FG1.ndf 12820
Edgesight_FG2_Data E:\DB\Edgesight_FG2.ndf 25350
Edgesight_FG3_Data E:\DB\Edgesight_FG3.ndf 7322
Edgesight_FG4_Data E:\DB\Edgesight_FG4.ndf 46623
Edgesight_FG5_Data E:\DB\Edgesight_FG5.ndf 8250
Edgesight_FG6_Data E:\DB\Edgesight_FG6.ndf 245020
Edgesight_FG7_Data E:\DB\Edgesight_FG7.ndf 12500
© 2012 Citrix | Confidential – Do Not Distribute
Analyzing the content of the database – Step2
18
SELECT DISTINCT object_name(i.id) as TableName,
f.name as Filegroup
FROM sys.sysindexes i,
sys.filegroups f
WHERE objectproperty(i.id,'IsUserTable') = 1
AND f.data_space_id = i.groupid
ORDER BY f.name
GO
© 2012 Citrix | Confidential – Do Not Distribute
Analyzing the content of the database – Step3
19
SELECT
sysobjects.Name,
sysindexes.Rows
FROM
sysobjects
INNER JOIN sysindexes
ON sysobjects.id = sysindexes.id
WHERE
sysindexes.IndId < 2
AND sysobjects.Name IN('CORE_NET_STAT',
'CORE_NET_TRANS')
Name Rowscore_net_trans 260585114core_net_stat 15265822
© 2012 Citrix | Confidential – Do Not Distribute
Analyzing the content of the database – Step4
20
- Finding out about the grooming schedule:
SELECT f.table_name, m.default_days, m.groom_days
FROM maint_table_config m
JOIN table_def f on f.tableid=m.tableid
WHERE table_name in ('CORE_NET_STAT', 'CORE_NET_TRANS')
© 2012 Citrix | Confidential – Do Not Distribute
Analyzing the content of the database – Step4
21
- Has the grooming been failing?
SELECT COUNT(*) FROM CORE_NET_TRANS
WHERE dtperiod < GETUTCDATE() - 11
© 2012 Citrix | Confidential – Do Not Distribute
Removing Data manually
22
- Grooming is failing – Delete data in incrementsdeclare @row int;
declare @date datetime;
set @date = GETUTCDATE() - 10
set @row = (select COUNT(*) from core_net_trans where dtperiod < @date);
while @row <> 0
begin
delete top(100000) from core_net_trans where dtperiod < @date
set @row = (select COUNT(*) from core_net_trans where dtperiod < @date);
end;
go
DBCC SHRINKFILE (N'Edgesight_FG6_Data' , 0, TRUNCATEONLY)GO
© 2012 Citrix | Confidential – Do Not Distribute
Removing Data manually
23
• Grooming is not failing - Analyze the content of the table
SELECT c.imid, i.[filename], count(c.imid) as cnt from core_net_trans c
JOIN [image] i ON i.imid=c.imid
GROUP BY c.imid, i.[filename]
ORDER BY cnt DESC
=> Delete the process instance records from the table
Imid filename cnt507 SomeApp.exe 220659855380 ntpd.exe 1252884460 iexplore.exe 1244863377 ctxxmlss.exe 989565202 cscript.exe 977522201 Requestticket.exe 645777402 Svchost.exe 412354220 Svchost.exe 322526506 Mcscript_inuse.exe 145235414 Jusched.exe 22589519 Javaw.exe 22459
© 2012 Citrix | Confidential – Do Not Distribute
Reclaiming disk space
24
• Using SQL Studio (SSMS)
• Using the following query
DBCC SHRINKFILE (N'Edgesight_FG6_Data' , 0, TRUNCATEONLY)GO
© 2012 Citrix | Confidential – Do Not Distribute
Adjust collection configuration
25
• Adjust the grooming schedule
• Review the upload configuration
• Ignore processes if applicable
© 2012 Citrix | Confidential – Do Not Distribute
Ignoring a process
26
Imid filename cnt507 SomeApp.exe 220659855380 ntpd.exe 1252884460 iexplore.exe 1244863377 ctxxmlss.exe 989565202 cscript.exe 977522201 Requestticket.exe 645777402 Svchost.exe 412354220 Svchost.exe 322526506 Mcscript_inuse.exe 145235414 Jusched.exe 22589519 Javaw.exe 22459
© 2012 Citrix | Confidential – Do Not Distribute
Ignoring a process (Excluding a process)
27
• Disable injection of csma_ldr.dll
• Per device registry setting
• Requires a reboot of the monitored device
© 2012 Citrix | Confidential – Do Not Distribute
Ignoring a process – Finding affected servers
28
SELECT m.name, COUNT(m.name) AS cnt FROM core_net_trans c
INNER JOIN instance i ON i.instid=c.instid
INNER JOIN machine m ON m.machid=i.machid
INNER JOIN [image] im ON im.imid=c.imid
WHERE im.[filename] = ‘SomeApp.exe‘
GROUP BY m.name
ORDER BY cnt DESC
name cntXAServer112 196231548XAServer115 18230540XAServer233 12887XAServer225 1997XAServer227 1520XAServer320 1519XAServer196 1512XAServer302 1496XAServer112 12XAServer112 9
© 2012 Citrix | Confidential – Do Not Distribute
• Use Sysinternals Process Explorer
Ignoring a process – Verifying process exclusion
29
© 2012 Citrix | Confidential – Do Not Distribute 30
© 2012 Citrix | Confidential – Do Not Distribute
Design consideration – SQL server
31
• Split the filegroups on different hard drives
http://msdn.microsoft.com/en-us/library/ms187087(v=sql.105).aspx
• Set the recovery model to simple for the Edgesight database
http://msdn.microsoft.com/en-us/library/ms189275(v=sql.105).aspx
• Implement Data warehousing
A word on Custom Reporting
© 2012 Citrix | Confidential – Do Not Distribute
XenApp servers with Edgesight Agent
Endpoints
© 2012 Citrix | Confidential – Do Not Distribute
Where to find data… Tables vs Views
34
• 283 user defined tables Schema is not documented Design is complex
• 96 SQL views Fully documented Used by the built in reports Recommended when creating custom reports
© 2012 Citrix | Confidential – Do Not Distribute
What you need to know…
35
• Limited to historical reports
• Built in report files located under <Program Files (x86)\Citrix\System
Monitoring\Server\EdgeSight\Pages\app\ext\reporting\9>
• Uses Reporting services RDL format (XML)
• Queries are written in T-SQL
• Localization built in Edgesight
© 2012 Citrix | Confidential – Do Not Distribute
Tools
36
• An XML editor
• Report Builder
• Report Designer (Business Intelligence Development Studio)
• SQL Studio (SSMS)
© 2012 Citrix | Confidential – Do Not Distribute 37
© 2012 Citrix | Confidential – Do Not Distribute 38
© 2012 Citrix | Confidential – Do Not Distribute
© 2012 Citrix | Confidential – Do Not Distribute
Resources
40
• Custom Report Blog
http://blogs.citrix.com/2009/12/09/edgesight-custom-reporting/
• Report Definition Language
http://msdn.microsoft.com/en-us/library/ms155062.aspx
• Microsoft Report Builder
http://www.microsoft.com/sqlserver/en/us/solutions-technologies/business-intelligence/SQL-
Server-2012-reporting-services.aspx
• Anatomy of an Edgesight Report
http://support.citrix.com/article/CTX116452