How to determine the number of tags in your PI system
Perhaps the easiest way to get the total number of tags is to open PI System Management Tools (aka PI SMT) and navigate to the 'Points' tool in the lower left pane. Expand it to locate the 'Point Source Table'. Here you will find your pi points count by point source. This can be exported to a csv file using one of the icons in the top tool bar.
Is there any way to view this for historical counts? For example, what my counts were by point source back in November 2017?
Hi Kelsey, you should be able to devise a query that filters a list of tag based on point source and the creation date of the tag. I would imagine the easiest place to do this would be in PI builder. The key would be to include the creationdate parameter and then setup a filter in excel to compare to a chosen date.
You could be equally clever in things like Powershell or the AFSDK depending on what tools you want to use.
Adding to what James said, another easy way in SMT is the following: In SMT, connect to the Data Archive you want to know the point count of and then navigate to Operation > Snapshot and Archive Statistics. Once in the Snapshot and Archive Statistics window, make sure that either the radio button labeled "Snapshot" or "Both" is selected. There will be a counter labeled "Point Count", which is the total number of points on your system.
Additionally, you could also do the following: On the machine the Data Archive is installed on, open a command prompt and type cd /d %piserver%adm. Once in the adm folder, type piartool -ss. Statistics of the Snapshot Subsystem will be continuously printed out to the console. There is a field labeled "Point Count", which is the total number of points on your system. To stop the continuous output, type ctrl + c.
You could also determine the number of points using a program with AF SDK. Here is an example:
PIServer piServer = new PIServers()["dataArchiveName"];
This will print out the number of points on your system to the console.
Another way to easily find this is to navigate to %piserver%\adm in command prompt on your data archive. Then type the command: piartool -ss
This is an example of the output:
C:\Program Files\PI\adm>piartool.exe -ss
Counters for 16-Jan-18 09:18:23 (all tags)
Point Count: 1383 0
Snapshot Events: 76927579 0
Out of Order Snapshot Events: 614760 0
Snapshot Event Reads: 62898038 0
Events Sent to Queue: 49234280 0
Events in Primary Queue: 0 0
Number of Queue Files: 2 0
Events in Queue: 0 0
Estimated Remaining Capacity: 4294967295 0
The Point Count field will tell you how many tags are in your system.
I'm glad no one has yet suggested to do a wildcard point search and looking at the returned point count (don't do that!).
An alternative way to monitor and find the point count is to use the PI Base Subsystem "Point Count" perfmon counter, which you could have a PI perfmon point historize data for. As indicated by three different suggestions in three different threads, there are various ways to consume the point count, and the best one depends on your use case and what you're trying to do with it.
On a healthy PI Data Archive, the point count returned from PI Base Subsystem (as seen from the perfmon counter) should always match the point count returned from PI Snapshot Subsystem (from 'piartool -ss'/SMT as Stuart reference above).
Retrieving data ...