# Display gateway activity level of redundant sys on a client

**URL:** <https://forum.inductiveautomation.com/t/display-gateway-activity-level-of-redundant-sys-on-a-client/11906>\
**Category:** Ignition\
**Created:** [July 7, 2016, 6:41pm UTC](https://forum.inductiveautomation.com/t/display-gateway-activity-level-of-redundant-sys-on-a-client/11906 "2016-07-07T18:41:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [July 7, 2016, 6:41pm UTC](https://forum.inductiveautomation.com/t/display-gateway-activity-level-of-redundant-sys-on-a-client/11906/1 "2016-07-07T18:41:08Z")

</div>

I try to use the following code to display gateway redundancy activity level of both gateway on a client :

Inside a 1 sec timer gateway script :

```auto
	import system
	from com.inductiveautomation.ignition.gateway import SRContext

	if SRContext.get().getRedundancyManager().isMaster():
		pathCurrentGW = "DIAG/serverM/system/ActivityLevel"
		pathPeerGW = "DIAG/serverB/system/ActivityLevel"		
	else:
		pathCurrentGW = "DIAG/serverB/system/ActivityLevel"
		pathPeerGW = "DIAG/serverM/system/ActivityLevel"		
	
	# Return : Active / Cold / Hot / Undecided / Warm 
	etat = str(SRContext.get().getRedundancyManager().getCurrentState().getActivityLevel())
	system.tag.write(pathCurrentGW,etat)
	
	etat = str(SRContext.get().getRedundancyManager().getPeerConnectionStatus().getActivityLevel())
	system.tag.write(pathPeerGW,etat)	
```

![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:") It doesn’t work in all case…

It’s ok when Master is active and backup is warm,  
but when I force a failover to the backup :

tag : DIAG/serverM/system/ActivityLevel display active instead of warm as in the web page !

When I restart the Master, with backup actibe, the tag DIAG/serverM/system/ActivityLevel display : undecided instead of active as in the web page ?

Any idea to correct this or another way to achieve this : displaying both gateway redundancy activity level in the client.

---

<div class="post-metadata">

**Author:** ![Connor](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Connor](https://forum.inductiveautomation.com/u/Connor)\
**Post date:** [October 2, 2016, 2:49am UTC](https://forum.inductiveautomation.com/t/display-gateway-activity-level-of-redundant-sys-on-a-client/11906/2 "2016-10-02T02:49:31Z")

</div>

Maybe I am misunderstanding your issue, but why aren’t you using the ActivityLevel tag that is already in the tag browser in the Ignition Designer?

In the tag browser under System\>Gateway\>Redundancy\>Activitylevel is where the tag is located. You can just use that tag in your project.

Connor

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 3, 2016, 6:46am UTC](https://forum.inductiveautomation.com/t/display-gateway-activity-level-of-redundant-sys-on-a-client/11906/3 "2016-10-03T06:46:12Z")

</div>

this issue has been solved in ignition 7.8.4.  
My goal was to be able to display gateway redundancy state of both part of the redundant system : the active and the other : warm or another state.
