![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Des cription" | grep -v Last |
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |