I want to calculate pi process book & PI Data link user in PI server.
PINetMgr exports a counter to Windows Performance Monitor showing number of active connnections to PI. You could view Network Manager Statisitics to determine how many internal and external connections represent the number of internal connections (e.g. PIBaseSS talking to PISnapSS, and PIArchSS talking to PISnapSS, and etc) and the number of external connections which represent your interfaces to PI (e.g. OPC interface and PI Buffer Subsystem writing data to PI system). The difference would be the number of PI visualization client connections to PI. The difference could be calculated using a data set in ProcessBook, or a Performance Equation, or a PI AF analysis calculation.
You can run piconfig from the command line on the PI server to extract the PI Network Manager Statistics table and then parse that with a program or script.
* (Ls - ) PIconfig> @table pinetmgrstats
* (Ls - PINETMGRSTATS) PIconfig> @ostr ID,Name,RegAppName
* (Ls - PINETMGRSTATS) PIconfig> @ends
*PIconfig Err> Wild-card specs. missing, default to '*'.
32302,EXCEL.EXE(32960):remote,PI DataLink AF PI Point Data Reference
You can see the ProcessBook and DataLink lines above.
Steve's scropt is simple and accurate. many scripts have been shared over the years for calculating number of connects and number over of client connects. getting the data into a PI tag is the challenge. ;-)
Previously we had following conversation too. How to store number of connections to PI server from a specified source?
Also I found "List Current Connections" from Download center. (quite old though)
Which means that PI Admin people do these kind of things. I hope we could do it more easily...
Also we have
PI ProcessBook and PI DataLink Usage Reporting Tool
how counter number take as PI tag?.
In addition to the suggestions so far from others, I would like to also point out that the release of PI Data Archive 2016 R2 now also includes a built-in feature to track connection history to your server. You would be able to query and see counts and summaries of the connections to the server over a specified time range. Please see this page in Live Library for more details. Note that you would need to upgrade if you are not running the latest version of PI Data Archive, so this may limit the feasibility of this as a solution.
Retrieving data ...