edmiTraceServer


 

EdmiError edmiTraceServer(SdaiString  password,
                           SdaiInteger traceFunction,
                           SdaiInteger appServerClientId,
                           SdaiInteger options,
                           SdaiInteger maxTraceFileSize,
                           SdaiString  traceFile,
                           SdaiString  localFile,
                           SdaiString  *hosts,
                           SdaiString  *groups,
                           SdaiString  *users,
                           SdaiString  *cmd_code,
                           SdaiInteger *clientId);

Operates the EDMinterface server trace facilities from a thick EDMclient. The EDMinterface server trace facilities is a powerful trace mechanism to assist EDMServer system administrators in a trouble shooting process, either by analyzing the trace output themselves, or by forwarding the trace to EPM support.
Several options for tracing may be specified. The resulting trace output will be in plain ASCII. Running with the EDMinterface server trace active will normally reduce the performance of EDMinterface operations considerably. Users are therefore adviced to operate the system without tracing under normal conditions. The trace should be switched on, only in trouble shooting sessions. The trace information from the EDMapplicationServers will be merged into the main server trace in sequential order. Currently there is no run-time option for tracing a single application server process. However, this feature is obtainable but requires a full remake the EDMserver.

Arguments


1TypeNameComment
2SdaiString

password

The password of the superuser. If the calling user is already connected as superuser, then this password argument may be omitted. This command will be available for any user when the database is closed or when no thick EDMclients are connected to the EDMserver,

3SdaiInteger

traceFunction

The EDMinterface server trace operation to perform. Available operations are:

  • DEFINE_TRACE: Define EDMinterface server trace conditions.
  • START_TRACE: Start EDMinterface server trace with the defined trace conditions
  • STOP_TRACE: Stop EDMinterface server trace.
  • CLOSE_TRACE: Stop EDMinterface trace and close the EDMinterface server trace file, if open.
  • GET_SRV_TRACE_FILE: Read the server trace file(s) from the server and put them in the <localFile(s)>.
4SdaiInteger

appServerClientId

The clientId of the EDMapplicationServer process to trace. At the moment there is no run-time option for tracing a single application server process. However, this feature is obtainable but requires a full remake the EDMserver. When this parameter is set zero, the EDMServer will be traced. The clientIds of the EDMapplicationServer processes may be obtained by the EDMSupervisor commands Aux->WhoIsOn or RemoteSystems->Aux->WhoIsOn.
See also Example 2 for how to obtain the clientIds of the EDMapplicationServer processes by use of the EDMInterface API fuctions.
This parameter is only applicable in combination with the DEFINE_TRACE function.

5SdaiInteger

options

See description of available options below. Options may be joined by using the bitwise OR operator

6SdaiInteger

maxTraceFileSize

The maximum number of bytes in the <traceFile>. When this threshold value is exceeded, the trace file will be chopped. A zero value will disable the trace file chopping feature. Only a single trace file will be generated. When chopping a trace file, the first chop will be named <tracefile>. Any subsequent chops will be named TF_<no>_<tracefile>, where <no> is an increasing sequence number. This parameter is only applicable in combination with the DEFINE_TRACE function.

7SdaiString

traceFile

Name of the EDMinterface server trace file. This parameter is only applicable in combination with the DEFINE_TRACE function.

8SdaiString

localFile

The name of the file on the local file system to copy the server trace file(s) to. In case of multiple trace file chops, all files may be obtained by using the ALL_CHOPPED_FILES option.
This parameter is only applicable in combination with the GET_SRV_TRACE_FILE function.

9SdaiString

hosts

Currently not used.

10SdaiString

groups

Currently not used.

11SdaiString

users

Currently not used.

12SdaiString

cmd_code

Currently not used.

13SdaiInteger

clientId

Currently not used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

Options


 

 OptionComment
1

SRV_TRACE_CMD

Trace the command messages sent from the client to the server.

2

SRV_TRACE_REPLY

Trace the reply messages sent back from the server.

3

SRV_TRACE_HEADER

Trace the command and reply headers

4

SRV_TRACE_BODY

Trace the command and reply bodies

5

SRV_TRACE_TO_STDOUT

Send the trace output to the terminal window in which the EDMserver was started.

6

SRV_TRACE_TO_FILE

Send the trace output to a file on the remote file system.

7

SRV_TRACE_ERRORS

Trace any erroneous client server communication

8

SRV_TRACE_VERBOSE

Trace events such as getting and releasing semaphores etc.

9

SRV_TRACE_VERBOSE_LIGHT

 

10

SRV_TRACE_TIME

Trace the time elapsed for execution of commands by the EDMserver.

11

SRV_TRACE_FLUSH_ON

Flush the server trace after each printout. This ensures that all the trace information will be available even in case of unforeseen events like a server crash.

12

SRV_TRACE_FULL

This option is equivalent to the combination of the following options:
SRV_TRACE_CMD, SRV_TRACE_REPLY, SRV_TRACE_HEADER, SRV_TRACE_BODY, SRV_TRACE_TO_STDOUT, SRV_TRACE_ERRORS, SRV_TRACE_VERBOSE, SRV_TRACE_TIME, SRV_TRACE_FLUSH_ON                          

13

SRV_TRACE_BRIEF

Only the clientId, the sequence number and the command and reply names will be traced.
Example output:
#3 [53] CMD: Cmd_WhoIsOnServer
#3 [53] REPLY: R_WhoIsOnServer
#3 REPLY: completed.

14

SRV_TRACE_STDOUT_BRIEF

Same as for SRV_TRACE_BRIEF, but the trace will not be written to a trace file.

15

SRV_TRACE_ALL_SERVERS

Trace the main server as well as all connected EDMapplicationServer processes.

16

SRV_TRACE_ALL_CHOPPED_FILES

Read the specified trace file and all its chops from the server to the local file system. This option is only applicable in combination with the GET_SRV_TRACE_FILE function.

17

SRV_TRACE_APP_SERVER_TRACE

 

18

SRV_TRACE_APP_SERVER_ON_SERVER

 

Example


 

 EdmiError rstat, error;
 SdaiInteger nErr, nWrn, userStatus;
 SdaiOptions options;
 SdaiModel myTargetModelId;
  
 /* Define the trace */
 options = SRV_TRACE_BRIEF;
 options |= SRV_TRACE_TO_FILE;
 options |= SRV_TRACE_ALL_SERVERS;
 rstat = edmiTraceServer("xf667cx", DEFINE_TRACE, 0, options, 0,
 "myTrace.trc", NULL, NULL, NULL,  
 NULL, NULL, NULL); 
  
 /* Import the first model while tracing */
 rstat = edmiTraceServer("xf667cx", START_TRACE, 0, 0, 0, NULL,
 NULL, NULL, NULL, NULL, NULL, NULL); 
 rstat = edmiReadStepFile("c:/data/MyFirstModel.stp", NULL, NULL,
 "DataRepository", NULL, "MyFirstModel",  
 "MySourceSchema", NULL, 0, 0, &error);  
  
 /* Import the second model without tracing */
 rstat = edmiTraceServer("xf667cx", STOP_TRACE, 0, 0, 0, NULL,
 NULL, NULL, NULL, NULL, NULL, NULL); 
 rstat = edmiReadStepFile("c:/data/MySecondModel.stp", NULL, NULL,
 "DataRepository", NULL, "MySecondModel",  
 "MySourceSchema", NULL, 0, 0, &error);  
  
 /* Convert the models while tracing */
 rstat = edmiTraceServer("xf667cx", START_TRACE, 0, 0, 0, NULL,
 NULL, NULL, NULL, NULL, NULL, NULL); 
 rstat = edmiConvertModelsBN(
 "DataRepository.MyFirstModel DataRepository.MySecondModel", 
 "MyModelMap", "DataRepository.MyTargetModel",  
 NULL, NULL, NULL, 0, NULL, 0, &myTargetModelId,  
 &userStatus, &nWrn, &nErr);  
  
 /* Stop tracing and close the trace file */
 rstat = edmiTraceServer("xf667cx", CLOSE_TRACE, 0, 0, 0, "myTrace.trc",
 NULL, NULL, NULL, NULL, NULL, NULL); 
  
 /* Read the trace file from the
 remote to the local file system */ 
 rstat = edmiTraceServer("xf667cx", GET_SRV_TRACE_FILE, 0, 0, 0,
 "myTrace.trc", "c:/tmp/myTrace.trc",  
 NULL, NULL, NULL, NULL, NULL); 
 . . .

 

See also

Filter by label

There are no items with the selected labels at this time.