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
1 | Type | Name | Comment |
2 | SdaiString | 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, |
3 | SdaiInteger | traceFunction | The EDMinterface server trace operation to perform. Available operations are:
|
4 | SdaiInteger | 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. |
5 | SdaiInteger | options | See description of available options below. Options may be joined by using the bitwise OR operator |
6 | SdaiInteger | 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. |
7 | SdaiString | traceFile | Name of the EDMinterface server trace file. This parameter is only applicable in combination with the DEFINE_TRACE function. |
8 | SdaiString | 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. |
9 | SdaiString | hosts | Currently not used. |
10 | SdaiString | groups | Currently not used. |
11 | SdaiString | users | Currently not used. |
12 | SdaiString | cmd_code | Currently not used. |
13 | SdaiInteger | clientId | Currently not used. |
Return Value
Options
Option | Comment | |
---|---|---|
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: |
13 | SRV_TRACE_BRIEF | Only the clientId, the sequence number and the command and reply names will be traced. |
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.