dbTalk Databases Forums  

Re: [Info-Ingres] Ingres dispatch_command ?

comp.databases.ingres comp.databases.ingres


Discuss Re: [Info-Ingres] Ingres dispatch_command ? in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lin.a.bradbrook@uk.bnpparibas.com
 
Posts: n/a

Default Re: [Info-Ingres] Ingres dispatch_command ? - 01-27-2011 , 07:33 AM






Here's a little script named 'queries' which I use all the time to show
what's currently running in the servers.

It just does one pass through all of them and writes the results to
stdout. It also prints any session descriptions (if you use them) and
picks up any
Mutexes if there are any.

This may be more like what you want:
Rgds,
Lin

#!/usr/bin/ksh
for SERVER in `iigcfid iidbms`
do
echo $SERVER
echo ""
echo ""
echo "show user sessions formatted"|iimonitor $SERVER|egrep "Query: |Mutex
Quote:
Des
cription" | grep -v Last
echo ""
echo ""
done





Internet
cian.scripter (AT) gmail (DOT) com
Sent by: info-ingres-bounces (AT) kettleriver...ting (DOT) com
27/01/2011 13:16
Please respond to
info-ingres (AT) kettleriverconsulting (DOT) com


To
info-ingres (AT) kettleriverconsulting (DOT) com
cc

Subject
Re: [Info-Ingres] Ingres dispatch_command ?






On Jan 27, 12:03 pm, "Paul Mason" <Paul.Ma... (AT) ingres (DOT) com> wrote:
Quote:
Hi,

I don't know dtrace but it looks like what this is doing is finding
instances where the dispatch_command() function is called and outputting
the second argument which presumably is the query text.

There isn't really an equivalent function you could use unless you can
navigate through various pointers and structures.

However if what you want is query tracing then I'd recommend trace point
SC930 - here's a little script to set it up.

#!/bin/sh
#
# turn on SC930 query tracing
#
# parameters:
# $1 - directory for logs (must exist) defaults to pwd
# $2 - trace level 1=queries, 2=queries+qeps default=1

LOGDIR=$1
if [ "$LOGDIR" = "" ]
then
LOGDIR=`pwd`
fi
echo "SC930 Log Directory set to $LOGDIR"
TRACE_LVL=$2
if [ "$TRACE_LVL" = "" ]
then
TRACE_LVL=1
fi
echo "SC930 trace level set to $LOGDIR"

if [ ! -d $LOGDIR ]
then
echo $LOGDIR does not exist
exit 2
fi

cd $LOGDIR
rm -f sess*

for dbms in `iigcfid iidbms`
do
export II_DBMS_SERVER=$dbms
echo II_DBMS_SERVER=$dbms

sql -s iidbdb <<!
set trace record '$LOGDIR';
set trace point sc930 $TRACE_LVL ;
\p\g\q
!
done

HTH
Paul



-----Original Message-----
From: info-ingres-boun... (AT) kettleriverconsulting (DOT) com [mailto:info-
ingres-boun... (AT) kettleriverconsulting (DOT) com] On Behalf Of Zfs..
Sent: 27 January 2011 10:57
To: info-ing... (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] Ingres dispatch_command ?

Hi,

Odd query.

In mysql I can run a dtrace script as follows to list all sql
statements being executed by the mysql process

#!/usr/sbin/dtrace -qs
pid$1::*dispatch_command*:entry
{
printf("%d::%s\n",tid,copyinstr(arg2));
}

This obviously fails when I run it against an Ingres DBMS server.

*dispatch_command*:entry does not match any probes

My question then is, does anybody know what the appropiate probe to
Ingres would be to get the same information ?
_______________________________________________
Info-Ingres mailing list
Info-Ing... (AT) kettleriverconsulting (DOT) com

http://ext-cando.kettleriverconsulti...fo/info-ingres
Thanks for the reply Paul.

Thats exactly what I need. Although, I'm not sure how to stop the
logging after I execute the script ?
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres


__________________________________________________ _________
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is prohibited.

Please refer to http://www.bnpparibas.co.uk/en/infor...de=ECAS-845C5H for additional disclosures.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.