Analysis of OsiSoft’s PI Base Subsystem

One of the PI Base Subsystem (pibasess.exe) tasks is responsible for handling PI Points tag data access from PI SMT. If this service is not running, when the user tries to get PI Points or tag information from PI SMT, it will get the error message as follows:

This article will discuss how this service is processing tag data called PI Points and how it access and perform searching of the PI Points.

The PI points data is recorded in the file called pipoints.dat. The structure and record information of this file can be viewed using pidiag.exe as follows:

The typical output as follows:

The file consist of directory data and the actual data. Directory data contains offset location and the record size. The location of directory data is determined by directory location information above. In this case, it is at offset 1024 on the file. Here is the typical directory information:

Let’s perform close examination of the directory record at offset 0x410. It contains a number to determine the offset location within the file for the data record and its size. Since it is Big Endian format, the number is 0x1163, and the data record size is 0x1A.

To determine the offset location and actual record size, multiply the number with 8 and the record size also with 8. So, the offset location will be 0x1163 * 0x8 = 0x8B18 and the record size will be 0x1A * 0x8 = 0xD0. Here is the partial record information of the calculated sample:

To facilitate the record access, the directory data is divided into blocks of 4096 (0x1000) size, but at the last block it is less than 4096 bytes. So, the PI points directory size above will consists of 6 blocks + extra blocks with size less than 4096, with the calculation as follows:

Since each directory record has 0x8 bytes size, so the maximum record number will be 3423.

Each block of 4096 bytes has the capacity to contain 4096 / 8 = 512 (0x200) records.

So, to access the data record, the PI program is using some number that will identify the block number and offset location of the data record.

To find a record, the number is divided by 512 to get the block # and perform and (&) operation with 0x1FF

For example the number 0x67E = 1662 / 512 = 3.24609375 (block #4 – counting start from 1). Then to find record location = 0x67E And 0x1FF = 0x7E = 126. This is the record number, and should be multiplied by 0x8 (0x7e * 0x8 = 0x3F0) to get the position of directory entry.

In this case, the directory entry is 0xF36B. To get the actual offset location of record, multiply this value with 0x8 = 0x79B58. This offset will points to the actual data record.

To facilitate the searching purposes, for example the tag name searching, all of the tag name string is arranged in some form of binary tree, and the string to be searched is compared by traversing the binary tree structure, starting from the root.

To determine which child node should be traversed, it is determined by the value of the string comparison. If it is less than zero, it will traverse to the right, if positive or zero it will traverse to the left. The zero value will indicates that the string to be searched is matched or found.

Here is the sample of the structure as it is viewed from memory:

As you can see from the above memory representation, each tree structure data contains the record number at offset 0x28, and string representation of tag name for the purpose of comparison process. The left child of the node is located at offset 0x0 and right child node is at 0x10.

For the above sample, record 0x8FC is the record for tag name LP7MB24-K57MS022_DOC01, 0x448 is the record for tag name LP7MB24-K57FV4082_ZT. The pibasess.exe will traverse this structure to try to find a match based on search criteria.

This concludes the PI points data structures and searching mechanisms of PI Points data in the pibasess.exe (PI Base Subsystem server).

You can leave a response, or trackback from your own site.

14 Responses to “Analysis of OsiSoft’s PI Base Subsystem”

  1. You can create interest in any topic! Good job!

  2. Analysis of OsiSofts PI Base Subsystem wdgo

  3. Nothing to say about myself I think.
    Nice to be here and a part of excellentcorner.com.
    I just hope I’m useful in one way here.

  4. ice fishing fish finder

    Analysis of OsiSoft

  5. auto body says:

    Hi, would you mind if I share your post with my twitter group?

    I have some friends that I think would dig your site.
    Please let me know. Much appreciated.

  6. bulk gas says:

    Howdy just wanted to give you a quick heads up. The text in your post seem to be running off the screen in Firefox.
    I’m not sure if this is a formatting issue or something to do with internet browser compatibility but I thought I’d post to let you know.
    The style and design look great though! Hope you get the problem resolved soon. Many thanks

  7. gospel says:

    You really make it seem so easy with your presentation but I find this matter to be actually something which I think I would never
    understand. It seems too complicated and extremely broad for
    me. I’m looking forward for your next post, I will try
    to get the hang of it!

  8. judi online says:

    You really make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand.
    It seems too complex and very broad for me.
    I am looking forward for your next post, I’ll try to get the hang of it!

  9. Super Budget Office Movers and Packers Abu Dhabi is equipped for every kind of commercial move in Abu Dhabi.
    With the help of knowledgeable staff and equipment, We provide best
    Office Movers and Packers in Abu Dhabi with Moving, Relocation and
    Shifting Services.

  10. porndroids says:

    I really like reading a post that will make
    people think. Also, thanks for permitting me to comment!

  11. Do you mind if I quote a few of your posts as long as I provide credit and sources
    back to your site? My blog is in the exact same area of interest as yours
    and my users would certainly benefit from some of the information you present here.
    Please let me know if this ok with you. Thank you!

  12. صيانة سامسونج مصر

    Analysis of OsiSoft

  13. Ahaa, its good dialogue on the topic of this article here at
    this website, I have read all that, so at this time me also commenting here.

  14. como importar roupas da china para revender

    Analysis of OsiSoft

Leave a Reply

Powered by WordPress and Bootstrap4