For all triggering events, event level 4, or 4 in combination with another value, a process is spawned after any diagnostic data files are written, and before the triggering event is processed. The spawned process executes the diagProc file. The diagProc file is an executable file that can accept three input parameters: the current event diagnostic directory name, the triggering event, and the database name.

On Unix, the diagProc file must be an executable or executable shell script named diagProc, and must reside in the database directory.

In Windows, the diagProc file must be an executable named diagProc.exe, or a batch file named diagProc.bat, and must reside in the database directory. The diagProc.exe file is searched for first, and diagProc.bat second. The first file found is executed.

CAUTION: An OpenEdge server calling an external executable or script is a potential security risk. Restricted access to the script is advised.

Example

Sample diagProc script:

#!/bin/sh
echo "Hello from the Diagnostic Data Collection script." > diagOut.txt
echo "Script name: $(basename $0)" >> diagOut.txt
echo "Arguments:" >> diagOut.txt
echo "First arg is $(basename $1)" >> diagOut.txt
echo "Second arg is $2" >> diagOut.txt
echo "Third arg is $3" >> diagOut.txt
To run the script in this example, create a directory named ddir and then do the following:
  1. Start your database as follows:
    -diagDir ddir -diagEvent LockTable:4
  2. Invoke Promon.
  3. Select R&D. Advanced options.
  4. Select 4. Administrative Functions.
  5. Select 14. Diagnostic Data Collection.
  6. Select 99a. Collect all enabled diagnostic data now.
  7. Exit Promon.
When you open the diagOut.txt file, you should see this:
Hello from the Diagnostic Data Collection script.
Script name: diagProc
Arguments:
First arg is diagEvent_2025-07-28T09:06:00.795-4:00_DbStatus_5
Second arg is DbStatus Request
Third arg is testdb