Hi,

As a temporary workaround, I am determining the number of user variables by taking the total number of shared variables and subtracting the number of domain variables.

I determine the number of domain variables through the <@VARNAMES> tag. Here's my code:

<@ASSIGN local$domainVarnamesArray VALUE="<@VARNAMES SCOPE='domain'>">
<@ASSIGN local$domainVarsCount VALUE="<@NUMROWS ARRAY='domainVarnamesArray'>">
<@ASSIGN local$totalSharedVarsCount VALUE="<@SERVERSTATUS VALUE='NumVarsShared'>">


totalSharedVarsCount: <@VAR local$totalSharedVarsCount><br>
domainVarsCount: <@VAR local$domainVarsCount><br>
userVarsCount: <@CALC "<@VAR local$totalSharedVarsCount> - <@VAR local$domainVarsCount>">



I'm not relying on this information being totally accurate, but it's close enough for my needs. One thing to be aware of is that I am not using any custom scopes. If you are, you'll need to take them into account in the calculation.


Eric



At 01:20 PM 10/27/2003, Robert Shubert wrote:
I second your request for broken up shared var information, however I
don't care about local, want to see users in one count and can live with
domain/app/custom in a another combined count.

WI: can this get onto a feature request list somewhere?

Robert

-----Original Message-----
From: Eric Weidl [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 9:28 AM
To: [EMAIL PROTECTED]
Subject: RE: Witango-Talk: @SERVERSTATUS variable store question

Hi,

I was researching @SERVERSTATUS, found this post in the list archive,
and
wanted to add some more information.

The Tango 2000 config application had a server status component. It
included alternate descriptions for each @SERVERSTATUS value than those
found in the documentation. For example, it included these descriptions
for
NumUsersShared, NumVarsShared , NumUsersLocal, and NumVarsLocal:


Shared Keys: The number of keys in the shared variable store. Equal to the total of: the number of users with non-expired variables, the number of domains with unexpired domain scope variables, and the number of unique custom scopes with unexpired variables.

Shared Vars: The number of variables in the shared variable store.

Local Keys: The number of keys in the local variable store or the total
number of current TAF executions with local variables.

Local Vars: The number of variables in the local variable store or the
total number of the above TAFs' local variables.


Very helpful information (and probably should be in the official docs). It pretty much confirms your thoughts on NumUsersShared.

It's interesting that NumUsersLocal always returns 1 for you; it always
returns 3 for me; probably has something to do with my TAF or machine
config.


One thing I would like to see in @SERVERSTATUS is the ability to get the


number of user/domain/custom scope variables individually, not added up
like in NumUsersShared.

Eric



At 06:42 PM 8/7/2003, you wrote:

>I tried what you did and got the same results. After trying a few more

>things, this is what I've found:
>
>-- The app server has NumUsersShared = 2 upon startup (not sure why).
>NumUsersShared does not go up when USERREFERENCE values are assigned to

>browsers.  It goes up once a user-scoped or domain-scoped variable is
>assigned.  If a browser gets a USERREFERENCE but your code never
assigns
>any variables, then that USERREFERENCE doesn't have anything in the
shared
>variable store and therefore doesn't show in NumUsersShared.  Since
this
>value goes up for both domain and user scopes, I doubt it can be used
to
>determine how many users you have with variables assigned.  This
behavior
>seems contrary to the the documentation.
>
>-- NumVarsShared = 22 when the server starts (not sure why, but some
must
>be for things like domain$variableTimeout).  NumVarsShared will go up
by 1
>for each domain-scoped variable assigned.  It will go up by 2 for the
>first user-scoped variable assigned (one for the assigned var and one
for
>user$variableTimeout).  After the first user-scoped assignment,
>NumVarsShared goes up by one for each additional assignment in the same

>USERREFERENCE.
>
>-- NumUsersLocal is always 1 in my tests.  I guess this makes sense,
since
>only one USERREFERENCE will apply to a single request.  But I wonder
why
>we can inspect this value if it's always the same.
>
>-- NumVarsLocal appears to show the number of defined local (request)
>scoped variables in the current request's processing, which also makes
sense.
>
>-- All of the above holds true across <@DOMAIN>s.  However, separate
><@DOMAIN>s will have separate instances of domain-scoped variables.
>Therefore, all variable instances will add up for NumUsersShared and
>NumVarsShared.
>
>
>(I didn't test with instance, method or application scopes.)
>
>
>It seems the shared variable store is a memory area that all threads
can
>access, while the local variable store is only accessible from the
thread
>that created it.  (I was thinking maybe shared variables are copied to
the
>local store for each request, but that would be kinda silly.)
>
>This has answered my questions for now.
>
>Thanks,
>- Jeff
>
>
>
>>Ya'Know I am not really sure what all the numbers means so I put it to
>>the test
>>
>>I created a taf with 1 results action equaling
>><@USERREFERENCE>
>><hr>
>><@SERVERSTATUS>
>>
>>I then open three separate instances of the browser and call the taf.
>>Each browser instance had it's own userreference.
>>But NumUsersShared stayed at 2
>>
>>So for using it to determine number of defined, Well?
>>I don't really know, Your mileage may vary ;-)
>>
>>Ben Johansen - http://www.pcforge.com
>>Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm
>>Authorized MDaemon Mail Server Reseller
>>http://www.pcforge.com/AltN.htm
>>
>>
>>-----Original Message-----
>>From: Jeffrey Bohmer [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, August 07, 2003 12:15 PM
>>To: [EMAIL PROTECTED]
>>Subject: Witango-Talk: @SERVERSTATUS variable store question
>>
>>
>>Witango 5.0.1.062 / OS X 10.2.6
>>
>>  From the <@SERVERSTATUS> docs:
>>
>>    Category       Description
>>NumUsersShared  number of user references in the shared variable store
>>NumVarsShared   number of variables in the shared variable store
>>NumUsersLocal   number of user references in the local variable store
>>NumVarsLocal    number of variables in the local variable store
>>
>>
>>What is the difference between the shared variable store and the
>>local variable store?
>>
>>To determine the number of user references defined on the app server
>>I should look at NumUsersShared, correct?
>>
>>- Jeff
>--
>
>Jeffrey Bohmer
>VisionLink, Inc.
>_________________________________
>303.402.0170
>www.visionlink.org
>_________________________________
>People. Tools. Change. Community.
>_______________________________________________________________________
_
>TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to