trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/3] incubator-trafodion git commit: add the genstats.sh script to help gather run-time stats easily.
Date Mon, 07 Mar 2016 17:58:07 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master e4b08c8a9 -> 3b2e3fdce


add the genstats.sh script to help gather run-time stats easily.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/aeedecb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/aeedecb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/aeedecb7

Branch: refs/heads/master
Commit: aeedecb7c4adfbba984c06610fe28944eddc5d7b
Parents: 1824c7e
Author: Qifan Chen <qfc@adev04.esgyn.com>
Authored: Thu Mar 3 19:55:45 2016 +0000
Committer: Qifan Chen <qfc@adev04.esgyn.com>
Committed: Thu Mar 3 19:55:45 2016 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/genstats.sh | 43 +++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/aeedecb7/core/sqf/sql/scripts/genstats.sh
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/genstats.sh b/core/sqf/sql/scripts/genstats.sh
new file mode 100755
index 0000000..7d7a7f0
--- /dev/null
+++ b/core/sqf/sql/scripts/genstats.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+#-- @@@ START COPYRIGHT @@@
+#--
+#-- Licensed to the Apache Software Foundation (ASF) under one
+#-- or more contributor license agreements.  See the NOTICE file
+#-- distributed with this work for additional information
+#-- regarding copyright ownership.  The ASF licenses this file
+#-- to you under the Apache License, Version 2.0 (the
+#-- "License"); you may not use this file except in compliance
+#-- with the License.  You may obtain a copy of the License at
+#--
+#--   http://www.apache.org/licenses/LICENSE-2.0
+#--
+#-- Unless required by applicable law or agreed to in writing,
+#-- software distributed under the License is distributed on an
+#-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#-- KIND, either express or implied.  See the License for the
+#-- specific language governing permissions and limitations
+#-- under the License.
+#--
+#-- @@@ END COPYRIGHT @@@
+#
+# This script generates the run-time stats for all the queries currently running.
+# The statistics outputs are channeled to stdout.
+#
+# If no argument is given, the per-operator run-time stats are generated. If arguments
+# are given, they are passed to the SQL command "get statistics for qid" without 
+# modification. A common argument is 'default', which generates the per-table stats.
+
+lso=$MY_SQROOT/export/limited-support-tools/LSO
+
+qids=`$lso/offender -s active -t 10 | grep -o 'MXID[^ ]*'`
+
+for qid in $qids 
+do
+  if [ $# = 0 ]; then
+    echo "get statistics for qid $qid ;" | sqlci
+  else
+    echo "get statistics for qid $qid $*;" | sqlci
+  fi
+done
+


Mime
View raw message