You would need to use PI SDK to get that sort of information. Have you checked the IPICollective interface? It provides lots of properties and methods, along with the Server object to work with the connected server. In particular please check out the IPICollective.OpenServers property.
2 of 2 people found this helpful
It might be too late for you and you perhaps have found a solution already, but for others who may find this post later, here is an alternative solution to the one Ahmad mentioned above:
You can use PI Performance Monitor Interface (basic version is shipped with PI Server and installed by default) and configure a few performance counters on both nodes of the PI Collective. In this particular case you are interested in "Current server" - "The index of the current server in the collective" counter. But there are many useful ones, you can find them all in PI System Reference Guide document in PI Performance Counters chapter.
So ones you configure Current Server counter it will store in the PI Tag an index of the server in the collective. And the value of that tag will be different on both nodes, e.g. your Primary server will get 0 in this tag, and your secondary will get 1. Thus in Processbook you can create a display similar to the one below, where based on this value you will show which member of the collective you are connected to.