# Tag counts from gateway status page

**URL:** <https://forum.inductiveautomation.com/t/tag-counts-from-gateway-status-page/77423>\
**Category:** Ignition\
**Created:** [August 4, 2023, 6:28am UTC](https://forum.inductiveautomation.com/t/tag-counts-from-gateway-status-page/77423 "2023-08-04T06:28:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [August 4, 2023, 6:28am UTC](https://forum.inductiveautomation.com/t/tag-counts-from-gateway-status-page/77423/1 "2023-08-04T06:28:01Z")

</div>

I just wrote a script utilising the tag report function to summarise the tags at a site, and am seeing significant differences between the numbers produced by the reporting tool and by the numbers in the "realtime providers" on the gateway status webpage.

Tag report function:

```auto
Tag summary
========================
total: 453767
tagType: {'UdtInstance': 33115, 'Folder': 29136, 'AtomicTag': 391516}
valueSource: {'memory': 59501, 'opc': 265960, 'reference': 24, 'expr': 66003, 'derived': 22, 'db': 6}
dataType: {'Int1': 1123, 'Float4': 52706, 'Int2': 735, 'DataSet': 6144, 'Float8': 8006, 'Int4': 45024, 'String': 77518, 'Int8': 21097, 'Document': 19, 'DateTime': 231, 'Boolean': 178913}
eventScripts: 3035
historyEnabled: 38924

```

Gateway status "Realtime Providers" page:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/2/a2f09b9fb3f5929be0da29c130e5d260f5b268dd.png)

The start of my code is this:

```auto
provider = 'default_fixed'
# list of tag properties to include in the summary. Must be valid tag properties
tag_summary_properties = ['tagType', 'valueSource', 'dataType', 'tagGroup', 'eventScripts', 'historyEnabled']
query = {
	"options": {
		"includeUdtMembers": True,
		"includeUdtDefinitions": False
	},
	"condition": {
		"attributes": {
			"values": [],
			"requireAll": True
		}
	},
	"returnProperties": tag_summary_properties
}

print 'Tag summary'
print '========================'
tags = system.tag.query(provider, query)
print 'total:', len(tags)

```

Edit: Nevermind... it must be the UDT definitions that I'm excluding

Edit2: No, including UDT definitions, I get this:

```auto
Tag summary
========================
total: 499151
tagType: {'UdtInstance': 35026, 'Folder': 31764, 'AtomicTag': 431452, 'UdtType': 909}
valueSource: {'memory': 68593, 'opc': 290888, 'expression': 1, 'reference': 35, 'expr': 71907, 'derived': 22, 'db': 6}
dataType: {'Int1': 1526, 'Float4': 59281, 'Int2': 1504, 'DataSet': 6572, 'Float8': 9085, 'Int2Array': 2, 'Int4': 49797, 'Int1Array': 47, 'Int4Array': 21, 'String': 83295, 'Int8': 22693, 'Document': 33, 'DateTime': 292, 'Float4Array': 5, 'Boolean': 197299}
eventScripts: 3238
historyEnabled: 41784

```

That leaves 6,520 tags unaccounted for 🤔

---

<div class="post-metadata">

**Author:** ![kyler.kamyszek](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kyler.kamyszek](https://forum.inductiveautomation.com/u/kyler.kamyszek)\
**Post date:** [August 4, 2023, 12:50pm UTC](https://forum.inductiveautomation.com/t/tag-counts-from-gateway-status-page/77423/2 "2023-08-04T12:50:41Z")

</div>

I believe the gateway status will also include any tags that are r/w to with scripting that are not defined as a tag in your providers.
