How to Read OPTS Logs
The replication of PI data across the OPTS applications involves detailed steps that are documented within the logs on each side. This article teaches the user how to read those logs.
Startup Process
Step 1

- When the application first starts, it outputs the application and PI-API version.
- The application then reads the configuration and outputs those configurations to the log file.
Step 2

- If using PI Trust login method, the WINE environment starts.
- If there are any issues with WINE, this will be the first point in which errors will occur.
Step 3

- Once the connection is established, the application begins to poll the database for tags.
- This is where point source filtering will be evident in the PiTaskFindRecs line.
- The tags are returned in 500 point chunks.
- The speed of the poll depends on connection and database resources.
Step 4

- When the digital point poll is finished, it outputs the results along with any errors.
- Any errors can be viewed in the following file:
/OwldataHD/owlPI/<side>/Data/OwlDigPointsOut.txt
Step 5

- Once the connection is established, the application begins to poll the database for tags.
- This is where point source filtering will be evident in the PiTaskFindRecs line.
- The tags are returned in 500-point chunks.
- The speed of the poll depends on the connection and database resources.
Step 6

- When the poll is done, the application outputs all tags found and whether it is filtering out any tags based on configuration.
Step 7

- The next step is for a Digital points poll to be performed on the PI database.
- This needs to be performed separately from the initial poll due to API constraints.
- This process can take quite a while if the database is large.
Step 8

- The digital points poll outputs status updates every minute.
- In some databases, the digital tags are lumped together, so long spans without finding digital tags is common.
Step 9

- When the digital point poll is finished, it outputs the results along with any errors.
- Any errors can be viewed in the following file:
/OwldataHD/owlPI/<side>/Data/OwlDigPointsOut.txt file
Step 10

- If extended attributes are configured, this poll of the database takes place in the background.
Step 11

- The application polls the digital state tables in the OSI PI database.
- Any errors are shown in the return message and output to the following file:
/OwldataHD/owlPI/<side>/Data/OwlStateNamesOut.txt
Step 12

- The last step of the process is the creation of the OwlPiRestart.bin file
- This file needs to be created only the first time a database is connected.
- If OPDS is switched to a different database, the file should be deleted under:
/OwldataHD/owlPI/<side>/Data/OwlPiRestart.bin
Step 13

- The application continuously steps through the database in 500-tag increments and write information to the destination databases.
- This is the indication of a healthy data transfer along with the minute statistics output.
Adding Tags
Blue Side
Step 1

- The added tag is recognized by the Blue OPTS application and is output to the OPTS logs.
Step 2

- OPTS Blue performs the point addition process.
Step 3

- The OwlPi Restart.bin file is updated with the newly added tag.
- Normal replication resumes.
Red Side
Step 1

- The process for appending the new tag to the internal restart file and destination OSI PI database begins.
- The results of this process are written to the following file:
/OwldataHD/owlPI/listen-red/Data/OwlPointsNewOut.txt
Step 2

- The process for appending the new tag to the internal restart file and destination OSI PI database begins.
- The results of this process are written to the following file:
/OwldataHD/owlPI/listen-red/Data/OwlPointsNewOut.txt
Step 3

- The new tag is written to the Destination PI database.
- If errors occur, they are printed at the end of the process.
- This process may take a while if the system is slow or is on a remote connection.
Step 4

- The OwlPiRestart.bin file is updated with the new tag(s).
- Normal replication resumes.
Editing Tags
Blue Side
Step 1

- Blue OPTS recognizes the edit to specific tag(s).
Step 2

- The Blue side begins the update process.
Step 3

- Edits are output to the logs for verification purposes.
Step 4

- The edit is processed internally and the update process finishes.
Step 5

- The Blue OwlPIRestart.bin file is updated.
- Normal replication resumes.
Red Side
Step 1

- The Red OPTS application recognizes the point modification received from the Blue side.
Step 2

- The modification process begins for the specified tag(s).
Step 3

- Red OPTS begins the modification process write to the destination database.
- The results of the edit are written to the following file:
/OwldataHD/owlPI/listen-red/Data/OwlPointsEditOut.txt
Step 4

- The edit process finishes with results output.
Step 5

- The new edit(s) are compared to the OwlPIRestart.bin file and updated for each tag.
- Normal replication resumes after this is complete.