[svn-commits] r169 - in branches/advisor/src: back/scf/hdr back/scf/scm front/st/vdba

thial01 at ingres.com thial01 at ingres.com
Sun Jul 27 11:46:15 PDT 2008


Author: thial01
Date: 2008-07-27 11:46:15 -0700 (Sun, 27 Jul 2008)
New Revision: 169

Modified:
   branches/advisor/src/back/scf/hdr/scmonitor.h
   branches/advisor/src/back/scf/scm/scmmain.c
   branches/advisor/src/back/scf/scm/scmonitor.sc
   branches/advisor/src/back/scf/scm/workloaddb.sql
   branches/advisor/src/front/st/vdba/makimau.sql
Log:
Adding new data points to the statistic collection - see #174


Modified: branches/advisor/src/back/scf/hdr/scmonitor.h
===================================================================
--- branches/advisor/src/back/scf/hdr/scmonitor.h	2008-07-21 17:40:55 UTC (rev 168)
+++ branches/advisor/src/back/scf/hdr/scmonitor.h	2008-07-27 18:46:15 UTC (rev 169)
@@ -98,11 +98,16 @@
 {
 	char	server[DB_MAXNAME*2];	
 	i4		current_connections;
-	i4		highwater_connections;
+	i4		current_sessions;
+	i4		max_session;
 	i4		total_rows;
 	i4		selects_processed;
-	i4		qsf_memleft;
-	i4		qsf_memtot;
+	i4		locks_per_tx;
+	i4		max_locks;
+	i4		locks_used;
+	i4		deadlocks;
+	i4		escalated_locks;
+	i4		lock_wait;
 }   ESQL_SCM_STATISTICS;
 
 

Modified: branches/advisor/src/back/scf/scm/scmmain.c
===================================================================
--- branches/advisor/src/back/scf/scm/scmmain.c	2008-07-21 17:40:55 UTC (rev 168)
+++ branches/advisor/src/back/scf/scm/scmmain.c	2008-07-27 18:46:15 UTC (rev 169)
@@ -527,6 +527,9 @@
 		i4		touched )
 {
 	
+	cpu = (cpu > MAXI4)?MAXI4:cpu;
+	dio = (dio > MAXI4)?MAXI4:dio;
+	
 	if (scm_check_analyze( NULL )) 
 	{
 		/* 

Modified: branches/advisor/src/back/scf/scm/scmonitor.sc
===================================================================
--- branches/advisor/src/back/scf/scm/scmonitor.sc	2008-07-21 17:40:55 UTC (rev 168)
+++ branches/advisor/src/back/scf/scm/scmonitor.sc	2008-07-27 18:46:15 UTC (rev 169)
@@ -71,7 +71,7 @@
 **
 **/
 
-// #define		DEBUG	
+#define		DEBUG	
 
 /* Global definitions */
 exec sql begin declare section;
@@ -81,9 +81,9 @@
 exec sql end declare section;
 
 /* How long do we sleep between wake-ups? */
-#define		SLEEP		30000
+#define		SLEEP		500
 /* How often do we wake up until we store data in workload DB? */
-#define		ROUNDS		5
+#define		ROUNDS		1
 /* How often do we store until we delete old entries from the workload DB? */
 #define		DELOLD		5
 /* And how old are the entries we delete (in seconds) */
@@ -974,20 +974,38 @@
     for (i = 0; i < scm->cur_sts_idx; i++)
     {
         
-        /* Use the highest value we've seen so far */
-        if (scm->statistics[i].highwater_connections > statistics.highwater_connections) 
+        /* Use the highest values we've seen so far */
+        
+        if (scm->statistics[i].locks_used > statistics.locks_used) 
         {
-        	statistics.highwater_connections = scm->statistics[i].highwater_connections;
+        	statistics.locks_used = scm->statistics[i].locks_used;
         }
+        if (scm->statistics[i].deadlocks > statistics.deadlocks) 
+        {
+        	statistics.deadlocks = scm->statistics[i].deadlocks;
+        } 
+        if (scm->statistics[i].escalated_locks > statistics.escalated_locks) 
+        {
+        	statistics.escalated_locks = scm->statistics[i].escalated_locks;
+        }
+        if (scm->statistics[i].lock_wait > statistics.lock_wait) 
+        {
+        	statistics.lock_wait = scm->statistics[i].lock_wait;
+        }        
+               
+               
+        /* Use the latest value we've seen */
         
-        /* Use the latest value we've seen */
         if (i == scm->cur_sts_idx - 1) 
         {
         	statistics.current_connections = scm->statistics[i].current_connections;
+        	statistics.current_sessions = scm->statistics[i].current_sessions;
+        	statistics.max_session = scm->statistics[i].max_session;
         	statistics.total_rows = scm->statistics[i].total_rows;
         	statistics.selects_processed = scm->statistics[i].selects_processed;
-        	statistics.qsf_memleft = scm->statistics[i].qsf_memleft;
-        	statistics.qsf_memtot = scm->statistics[i].qsf_memtot;
+        	statistics.locks_per_tx = scm->statistics[i].locks_per_tx;
+        	statistics.max_locks = scm->statistics[i].max_locks;
+        	
         	STprintf(statistics.server, scm->statistics[i].server);
         }
 	}

Modified: branches/advisor/src/back/scf/scm/workloaddb.sql
===================================================================
--- branches/advisor/src/back/scf/scm/workloaddb.sql	2008-07-21 17:40:55 UTC (rev 168)
+++ branches/advisor/src/back/scf/scm/workloaddb.sql	2008-07-27 18:46:15 UTC (rev 169)
@@ -101,11 +101,16 @@
 create table statistics (
     server varchar(64) not null,
     current_connections integer4 not null,
-    highwater_connections integer4 not null,
+    current_session integer4 not null,
+    max_session integer4 not null,
     total_rows integer4 not null,
     selects_processed integer4 not null,
-    qsf_memleft integer4 not null,
-    qsf_memtot integer4 not null,
+    locks_per_tx integer4 not null,
+    max_used integer4 not null,
+    locks_used integer4 not null,
+    deadlocks integer4 not null,
+    escalated_locks integer4 not null,
+    lock_wait integer4 not null,
     time integer4 not null,
     primary key(time)
 ) 

Modified: branches/advisor/src/front/st/vdba/makimau.sql
===================================================================
--- branches/advisor/src/front/st/vdba/makimau.sql	2008-07-21 17:40:55 UTC (rev 168)
+++ branches/advisor/src/front/st/vdba/makimau.sql	2008-07-27 18:46:15 UTC (rev 169)
@@ -2469,16 +2469,26 @@
     server varchar(64) not null not default is 'SERVER',
     current_connections integer4 not null not default
         is 'exp.scf.scd.server.current_connections',
-    highwater_connections integer4 not null not default
-        is 'exp.scf.scd.server.highwater_connections',
+    current_sessions integer4 not null not default
+        is 'exp.clf.unix.cs.srv_block.num_sessions',
+    max_sessions integer4 not null not default
+        is 'exp.clf.unix.cs.srv_block.max_sessions',
     total_rows integer4 not null not default is
         'exp.scf.scd.totrows',
     selects_processed integer4 not null not default is
         'exp.scf.scd.selcnt',
-    qsf_memleft integer4 not null not default
-        is 'exp.qsf.qsr.qsr_memleft',
-    qsf_memtot integer4 not null not default
-        is 'exp.qsf.qsr.qsr_memtot'
+    locks_per_tx integer4 not null not default is
+        'exp.dmf.lk.lkd_max_lkb',
+    max_locks integer4 not null not default is
+            'exp.dmf.lk.lkd_max_lkb',
+    locks_used integer4 not null not default is
+        'exp.dmf.lk.lkd_lkb_inuse',
+    deadlocks integer4 not null not default is
+        'exp.dmf.lk.lkd_stat.deadlock',
+    escalated_locks integer4 not null not default is
+        'exp.dmf.lk.lkd_stat.release_partial',
+    lock_wait integer4 not null not default is
+        'exp.dmf.lk.lkd_stat.wait'
 )
 as import from 'tables'
 with dbms = IMA,




More information about the svn-commits mailing list