Download presentation
Presentation is loading. Please wait.
Published byDaisy Ramsey Modified over 9 years ago
1
ASEMON Installation and usage of Asemon_logger and Asemon_report
JEAN-PAUL MARTIN Oct 2009
2
AGENDA Presentation Installation and setup Asemon_report Usage
Analyse ASE metrics Advanced configuration
3
Why use Asemon PRESENTATION
4
ORIGIN Needing tool for exploiting new MDA tables in ASE 12.5.3
History of Asemon Needing tool for exploiting new MDA tables in ASE Developed and maintained by me (no official project) Used for all my performance analysis consulting engagements First version was interactive (real time monitoring) Not good for post-incident analysis Still exists but not maintained by me See « for a new version Current version based on Asemon_logger : capture and archive metrics Asemon_report : web application for results analysis
5
OBJECTIVES Free (Gnu GPL license) Sources available
Principles retained for building Asemon Free (Gnu GPL license) Sources available As simple as possible Asemon_logger written in Java Easily extensible (add configuration files in XML) Auto admin (automatic schema admin, auto purge) Asemon_report Written in HTML and PHP Tested with Apache Any browser (prefer FIREFOX) Extensible (ASE 12, ASE 15, RS12, RS15, IQ12.7, IQ15, RAO)
6
REQUIREMENTS For Asemon_logger :
What do I need to run and use asemon For Asemon_logger : Install on a remote machine (not the production server) Can be Linux, Windows, Solaris, AIX, … (Any plateform supporting Java JRE 1.5) For archive database : need an ASE (12.5 or 15) database (preferably not on the production server) For Asemon_report : Can be installed on Windows PHP pages can be installed on an existing Web server Need php 5.2 Need Sybase Open Client (12.5 or 15) Any browser
7
VERSIONS Current version (as of 25 Oct 2009) Asemon_logger : V2.4.2
Asemon_report : V2.4.3 Download (go to "View all files" to get all downloadable modules)
8
FUNCTIONALITIES Practically all ASE MDA data
Metrics captured by asemon_logger for ASE Practically all ASE MDA data General counters (CPU, I/O, deadlocks, …) Objects activity Statements (all heavy SQL statements) With context of execution Plan Locks : blocking situations, and deadlocks situations … Other ASE metrics (not MDA based) Tables fragmentation Sysmon, spinlocks (all sysmonitors counters captured)
9
FUNCTIONALITIES RS : Queues usage Queues activity Rep Agent activity
Metrics captured by asemon_logger for RS, IQ RS : Queues usage Queues activity Rep Agent activity DSI activity Capture all new RS 15 counters IQ : Iq_status Asa statistics Connections versionning
10
FUNCTIONALITIES Read an XML config file
What does Asemon_logger Read an XML config file Start a Java thread for each group of metrics Delay for data collection depends of metrics (can be changed) Every 1 minute for most of metrics Every 5 s for blocking locks or statements Every 5 mn for objects activity Every 24 h for tables fragmentation Archive metrics in an ASE database A purge thread automatically remove old data (configurable)
11
FUNCTIONALITIES What is Asemon_report
12
Setup and configuration
INSTALLATION
13
ASEMON_LOGGER - INSTALL
First steps Get asemon_logger_V2.4.2.tgz (Oct 2009 current version) Untar it in any directory (ex. asemon) Check JRE install need JRE 1.5 or higher Verify with "java –version" By default asemon_logger search JRE in "$ASEMON_LOGGER_HOME/../jre1.5.0_11" (can be edited) Create an ASE database on Archive server. Size depends on : Monitored server activity (captured statements, processes, …) Number of kept days (default is 3 month) Number of monitored servers Start with a 1 Gb db, and monitor usage
14
ASEMON_LOGGER - CONFIG
Basic configuration Copy "conf/config.xml" to "conf/YourMonitoredServer.xml" Edit "conf/YourMonitoredServer.xml" : <ArchiveSrv> <name> enter_your_archive_server_here </name> <user> enter_archive_user_name_here </user> <database> enter_archive_database_name_here </database> <charset> </charset> </ArchiveSrv> <MonitoredSrv> <SRV> <name> enter_monitored_server_name_here </name> <user> enter_monitored_user_name_here </user> <srvDescriptor> enter_server_discriptor_name_here_(ex._:_ASEV125) </srvDescriptor> <purgearchive daysToKeep="90" deleteSleep="100" /> <RSSDServer> optional_name_of_RSSD_server_if_RS15_monitored </RSSDServer> <RSSDUser> optional_username_of_RSSD_server_if_RS15_monitored </RSSDUser> <RSSDDatabase> optional_name_of_RSSD_database_if_RS15_monitored </RSSDDatabase> </SRV> </MonitoredSrv>
15
ASEMON_LOGGER - CONFIG
What is server descriptor (<srvDescriptor> ) Depends on your monitored server Can be : ASEV125, ASEV15, IQ127, IQ15, RS126, RS15, RAO15 Is a reference to the list of XML descriptors next in the config file (each <md> describes a group of metrics) <SD> <name> ASEV15 </name> <type checkMonitoringConfig="yes"> ASE </type> <version> 1500 </version> <metricsDescriptorsFiles > <md> CachePool.xml </md> <md> CnxActiv.xml </md> <md> DataCache.xml </md> <md> DeadLock.xml </md> <md> DevIO_V15.xml </md> <md> Engines_V15.xml </md> ….
16
ASEMON_LOGGER - Before start
7. Configure monitored ASE Give "mon_role" to "sa" If "sa" is used. Can use another login with "sa_role" Can use a loging without "sa_role" but more configuration steps (see later) Configure MDA tables (not necessary with V15) Configure monitoring parameters Minimum configuration : Dynamic configuration after start, asemon_logger automatically see ASE configuration changes, and can capture more or less metrics exec sp_configure "max SQL text monitored", 2048 exec sp_configure "enable monitoring ", 1 exec sp_configure "object lockwait timing ", 1 exec sp_configure "wait event timing ", 1
17
ASEMON_LOGGER - Before start
Full monitoring Maximum configuration : This has impact on performance Use on DEV servers or sometimes on PROD servers exec sp_configure "max SQL text monitored", 2048 exec sp_configure "enable monitoring ", 1 exec sp_configure "object lockwait timing ", 1 exec sp_configure "wait event timing ", 1 exec sp_configure "SQL batch capture ", 1 exec sp_configure "per object statistics active ", 1 exec sp_configure "process wait events ", 1 exec sp_configure "sql text pipe active ", 1 exec sp_configure "sql text pipe max messages ", 1000 exec sp_configure "statement pipe active ", 1 exec sp_configure "statement pipe max messages ", 1000 exec sp_configure "statement statistics active ", 1 exec sp_configure "deadlock pipe active",1 exec sp_configure "deadlock pipe max messages",100 exec sp_configure "errorlog pipe active",1 exec sp_configure "errorlog pipe max messages",100 exec sp_configure "enable stmt cache monitoring ", V15
18
ASEMON_LOGGER - START Start command (Unix) Start command (Windows)
Start monitoring session Start command (Unix) asemon_logger.sh –c conf/YourMonitoredSrv.xml Start command (Windows) asemon_logger –c conf\YourMonitoredSrv.xml First time : it asks for passwords archive server passwd Monitored server passwd Save encrypt passwd in "passwords" file (in asemon_logger home directory) First time : creates archive tables in archive db Name : YourMonitoredSRV_XXXX XXXX = CachePool, Cnx, CnxActiv, DataCache, …
19
No double dash . This line will be re-encoded at next start
ASEMON_LOGGER - START Passwords file Can be edited (to reflect change in monitored or archive server) Ex. : # Store your passwords here. Asemon_logger encrypts not yet encrypted passwords when it starts # # Format of a not yet encrypted row : # SERVER;user;clear_password # Format of an encrypted row : # --SERVER;user;encrypted_password JPMV15;sa;new_password --JPMV125;sa;6ea3e8c4ed91a5ff7aee05ee6f187515 --JPMRS126;sa;184143b6c5cfe5cb --JPMIQ;DBA;72be430d17dd9b28 --JPMIQ15;DBA;945f14e36fa58556 --JPMRS15;sa;184143b6c5cfe5cb --JPMRS15_RSSD;JPMRS15_RSSD_prim;591dc2d4f7408fbb662388fedaa9d17bfbf9d3aed No double dash . This line will be re-encoded at next start
20
ASEMON_LOGGER - START Redirect output to a file Output
By default go to stdout C:\jpm\java\Asemon_logger>asemon_logger -c ../asemon_logger_work/config_JPMV125.xml 2009/10/02 13:55: Config file used : ../asemon_logger_work/config_JPMV125.xml 2009/10/02 13:55: Start Asemon_logger Version V2.4.1 2009/10/02 13:55: Try to connect to srv : JPMV125 2009/10/02 13:55: Srv found in interfaces or SQL.INI file. Host=loopback Port=7100 2009/10/02 13:55: Using password from passwords file for 'JPMV125.sa' 2009/10/02 13:55: Connected to archive server : JPMV125 Database : test 2009/10/02 13:55: Try to connect to srv : JPMV125 2009/10/02 13:55: Srv found in interfaces or SQL.INI file. Host=loopback Port=7100 2009/10/02 13:55: Using password from passwords file for 'JPMV125.sa' 2009/10/02 13:55: connectMonitoredASE - connected to : JPMV125 Version : 1254 2009/10/02 13:55: Warning : Server option 'SQL batch capture' is not set, not all statistics will be captured 2009/10/02 13:55: Warning : Server option 'per object statistics active' is not set, not all statistics will be captured 2009/10/02 13:55: Warning : Server option 'statement statistics active' is not set, not all statistics will be captured 2009/10/02 13:55: Start thread : JPMV125_CachePool 2009/10/02 13:55: Start thread : JPMV125_CnxActiv 2009/10/02 13:55: Start thread : JPMV125_DataCache 2009/10/02 13:55: Start thread : JPMV125_DevIO 2009/10/02 13:55: Start thread : JPMV125_DeadLock 2009/10/02 13:55: Start thread : JPMV125_IOQueue 2009/10/02 13:55: Start thread : JPMV125_Engines 2009/10/02 13:55: Start thread : JPMV125_NetworkIO 2009/10/02 13:55: Start thread : JPMV125_MonState 2009/10/02 13:55: Start thread : JPMV125_OpenDbs 2009/10/02 13:55: Start thread : JPMV125_ProcCache 2009/10/02 13:55: Start thread : JPMV125_MonSQL …
21
ASEMON_LOGGER No administration Leave it running all the time
Remarks No administration Leave it running all the time In case of asemon_logger upgrade, lastest version (2.4) automatically creates or alter archive tables Configure and start one asemon_logger per monitored server (even if asemon_logger can monitor several server if configured)
22
ASEMON_REPORT - INSTALL
On windows Get "AsemonReportSRV_V2.4.3.zip" (Oct 2009 current version) This is a bundle with Asemon_report, Apache, PHP and Sybase OCS Unzip in "c:\" (or anywhere else but more changes in config file) Edit " C:\AsemonReportSRV\Apache Group\Apache2\conf\httpd.conf" Change " ServerName martin-w2k.sybase.com:80" to " ServerName yourPCname:80" If not installed in "c:\" Change all references to "C:/AsemonReportSRV" and "C:\AsemonReportSRV" to reflect your installation Edit "C:\AsemonReportSRV\Sybase\ini\sql.ini" (add your archive srv)
23
ASEMON_REPORT - START Open a cmd windows
On windows Open a cmd windows Execute "C:\AsemonReportSRV\setup.bat" (not necessary if OCS already installed elsewhere on the PC) Start Apache : "C:\AsemonReportSRV\StartApache.bat" Note : Apache can be configured as a service (and then starts automatically when PC reboots) To setup service, execute : C:\AsemonReportSRV\Apache Group\Apache2\bin\apache –k install
24
ASEMON_REPORT on UNIX With an already installed Apache server Get "asemon_report_V2.4.3.tgz" (Oct 2009 current version) Untar it in web server environment Notes : Apache must be configured with PHP 5.2 Sybase OCS 12.5 or 15 must be installed
25
How to get results ASEMON_REPORT USAGE
26
ASEMON_REPORT USAGE In a browser call :
Access the main page In a browser call :
27
ASEMON_REPORT USAGE Connect to Archive server
4 – Choose monitored server type 5 – Choose monitored server 1 - Enter Server, user and password of Archive Server 2 – Click connect 3 – Choose archive database 6 – Quick period setup 7 – Refine analyzed period 8 – Choose type of metrics 9 – Ask results
28
ASEMON_REPORT USAGE Start with short analyzed period : ex. one day
Remarks Start with short analyzed period : ex. one day (hit the "today" button for exemple) Avoid "large" analysis data for a full month may be very long After reporting data, can refine the search period (edit "from" / "to" fields ) Choose another type of metric for the same period
29
Analyse results ANALYSE ASE METRICS
30
ASE METRICS Summary Statements Objects Stats Objects cached
Current functionalities Summary General counters, CPU graphs, I/O graphs, locks summary, caches summary …. Statements List of captured statements. Click a statement to get detail Objects Stats Statistics on tables and indexes (logical IO, physical IO, DML oper, …) Click an object to get detail usage during the analyzed period Objects cached Size of objects in caches Can get of graph of top 5 objects in each cache during the analyzed period
31
ASE METRICS - CONTINUED
Current functionalities Processes Statistics of captured process (CPU, IO, transactions, network, …) Locks List of blocking stituations (time blocked, who blocks, who is blocked, application /proc blocking / blocked, …) Deadlocks List of deadlocks LockWaits Summary of time wait per table and type of lock Procedures Summary of resource usage (cpu, io, …) per procedure captured at statement level
32
ASE METRICS - CONTINUED
Current functionalities Fragmentation Size and fragmentation of tables and indexes Sysmon Equivalent of "sp_sysmon" on the analyzed period Spinlocks Usage of all spinlocks (top use, contention) MissStats V15 : reports missing statistics on objects Trends Display graphs for KPI (about 25 key performance indicators) (One point per day for each KPI) Can see ASE usage evolution on time
33
STATEMENTS ANALYSIS Statement list
Can get results in Excel as well as SQL executed on Archive DB to get this result Plan is available for this statement This list is sorted by LReads DESC Click one statement to get detail
34
STATEMENTS ANALYSIS Statement detail
35
PROCESS ANALYSIS Process detail
Identification and Summary activity during the analyzed period Process detail Graph of network I/O Graph of TEMPDB usage Captured statements executed by this process Graph of CPU Graph of I/O Reads and Writes
36
Fragmentation ANALYSIS
Display level : 2 means display only rows with a bad ratio For Tables and Indexes YELLOW : not so bad RED : bad
37
SYSMON Equivalent of sp_sysmon Choose the section of interest
38
SPINLOCKS For advance monitoring Can have decomposed spinlocks
39
TRENDS Graphs of KPI's (one point per day) Choose the KPI to graph
40
ADVANCED CONFIGURATION
How to change default behaviour ADVANCED CONFIGURATION
41
UPDATE JCONNECT META DATA
For Archive Server only Check Jconnect metadata version on Archive Server Sp_version Script Version Status ODBC MDA Scripts /Mon :55: Complete OLEDB MDA Scripts /Mon :55: Complete installjdbc jConnect (TM) for JDBC(TM)/6.05(Build 26564)/P/EBF16676/JDK1 Complete Need EBF minimum If not, execute "sql_server_XXX.sql" from : "$Asemon_logger_home\jConnect-6_0\sp\" Where XXX corresponds to your Archive Server version
42
NON SA_ROLE LOGIN Configuration Often asked by customers (sa_role is often very restricted, or audited) Configuration (only for ASE monitored server) : Create an asemon login with mon_role Execute the perl script 'install_asemon_procs_non_sa.pl' Creates stored procs with sa_role (using Rob Vershoor’s technic) Alias asemon user to every database dbo (needed to get object names in any database) Use "config_for_non_sa.xml" rather than "config.xml" as template for your config file
43
NON SA_ROLE LOGIN Template config file (extract, no need to modify)
<SrvDescriptors> <SD> <name> ASEV125 </name> <type checkMonitoringConfig="yes"> ASE </type> <version> 1250 </version> <metricsDescriptorsFiles > <md> CachePool.xml </md> <md> CnxActiv.xml </md> <md> DataCache.xml </md> <md> DeadLock.xml </md> <md> DevIO.xml </md> <md> Engines.xml </md> <md> IOQueue.xml </md> <md> MonState.xml </md> <md> NetworkIO.xml </md> <md> OpenDbs.xml </md> <md> OpObjAct.xml </md> <md> ProcCache.xml </md> <md> SysWaits.xml </md> <md sp_showplan_proc="sp_asemon_showplan" > MonSQL.xml </md> <md> MonConf.xml </md> <md> Cnx.xml </md> <md> BlockedP.xml </md> <md sp_repagent_proc="sp_asemon_repagentstats" > RaActiv.xml </md> <md> LogsHold.xml </md> <md> ErrLog.xml </md> <md> CnxWaits.xml </md> <md> WEvInf.xml </md> <md> WClassInf.xml </md> <md sp_objstats_proc="sp_asemon_objstats" > LockWaits.xml </md> <md> SysMonFld_nonSA.xml </md> <md> SysDev.xml </md> <md> SysCaches.xml </md> <md> SysConf.xml </md> <md> SysMon_nonSA.xml </md> <md HOUR_EXEC="10" minpages="1000"> Fragment.xml </md> <md> Trends.xml </md> </metricsDescriptorsFiles> </SD>
44
TRACE FLAGS Debug : -D Special traceflags -T1 : skipRetreiveSQLText
Used at Asemon_logger startup Debug : -D Special traceflags -T1 : skipRetreiveSQLText -T2 : disableBulkLoad -T3 : enableJNDI -T4 : disable ENCRYPT PASSWORD
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.