GCA Tracing
From Ingres Community Wiki
Ingres uses a the General Communications Architecture (GCA) as the mechanism for interprocess communication, including those from client sessions, for example from applications linked with the OpenAPI or libq.
The ability to see these messages and their encoding can sometimes be invaluable in isolating a problem.
Environment or Symbol table
For applications and client processes tracing is controlled via values set in the environment. II_GCA_TRACE is used to include GCA trace messages in an output log. The output log is defined by the value of either II_API_LOG for OpenAPI programs or II_GCA_LOG for libq and Ingres processes. These can be set in the system environment or as variables in the Ingres symbol table.
The disadvantages of using the environment is that you have to be careful to unset the variables once the process being traced has started otherwise run the risk of having the log file being overwritten.
For example, to see communications with the data access server (iigcd) process:
ingsetenv II_GCA_LOG /tmp/gcdgca.log
ingsetenv II_GCA_TRACE 4
ingstart -iigcd
ingunset II_GCA_LOG
ingunset II_GCA_TRACE
config.dat entries
For Ingres processes it is also possible to set the log file and the trace level per process within the file $II_SYSTEM/ingres/files/config.dat.
For example,
iisetres ii.hostname.gcd.gca_trace_log /tmp/gcngca.log
iisetres ii.hostname.gcd.gca_trace_level 4
setting these values once in config.dat would be equivalent to the previous example without the need to remember to reset the environment.
iimonitor
Included in Ingres 2006 Release 2 is the ability to control tracing of all General Communication Facility (GCF) server using iimonitor. Tracing is interactive and can be started, stopped or changed using the iimonitor utility.
Use the "show servers" command in the iinamu utility to see a list of servers and their addresses.
Ingres 2006 Release 3 NAME SERVICE MANAGEMENT UTILITY -- -- Copyright (c) 2004 Ingres Corporation IINAMU> show servers RMCMD * 40775 DASVR * 33874 COMSVR * 42896 INGRES * 39115 (sole server) IUSVR * 32825 IINMSVR * 54302 IINAMU>
To set the log and the trace level as in the previous examples,
iimonitor 33874
IIMONITOR> set trace log /tmp/gcdgca.log
Logging enabled
IIMONITOR> set trace level gca 4
Tracing GCC at level 256
IIMONITOR>
Use the set trace log none command to stop tracing.
