"Active Users" from one or All instances

  • 98 Views
  • Last Post 22 September 2020
R0b95 posted this 22 January 2020

Hello,

in order to safe some money, I want to suspend my Server automatic. I want to read the active users from my instances to write an short script.

Maybe you know an usable API-Call for this use? Or I have to find an usable with trying by myself.

Thanks.

Order By: Standard | Newest | Votes
damago1 posted this 22 September 2020

Did you manage to resolve your problem? I am looking for this too. It seems that there is no such call or existing calls like Core/GetUserList or Core/GetStatus are returning wrong values (mpty list or zero)

damago1 posted this 22 September 2020

Ok. I have found this.

  1. you have to connect to the exact instance you want to check users in. So give port number of specific application when logging in or making API calls. Not port of AMP instance manager but port of the instance.

  2. you can use the API CALL:

Core/GetUserList - this returns simply a list of users

or

Core/GetStatus - here you will have inside information on the users too, in the form of a number :

example output:

{"State":50,"Uptime":"0:00:00:00","Metrics":{
 "CPU Usage":{"RawValue":0,"MaxValue":100,"Percent":0,"Units":"%","Color":"#EDC240","Color2":"","Color3":"#000"}, 
"Memory Usage":{"RawValue":0,"MaxValue":1024,"Percent":0,"Units":"MB","Color":"#AFD8F8"},
"Active Users":{"RawValue":0,"MaxValue":10,"Percent":0,"Units":"","Color":"#CB4B4B"},
"TPS":{"RawValue":0,"MaxValue":20,"Percent":0,"Units":"TPS","Color":"#fff"}}}

Close