We are currently trying to size our front-ends and load balancers based on active sessions. Really need a way to historize the perspective sessions of users. How do I accomplish this task?
Well, I figured it out. Just in case anyone else needs this info.
sessions = system.perspective.getSessionInfo()
tagPaths = ['tagpath to integer memory tag']
sessionslist = []
for users in sessions:
sessionlist = users
sessionslist.append(sessionlist)
count = len(sessionslist)
system.tag.writeBlocking(tagPaths, count)
Umm...if you are looking for the session count generally then just do
len(system.perspective.getSessionInfo())
2 Likes
If you have the EAM module, there's also a system tag automatically available.
Don't ask me why this particular thing requires the EAM module.
1 Like
Ah wow! This is way easier, may just reference to this tag instead. Thanks!