[Zope] how to count authenticated and anonymous users currently
online ?
Luca Dall'Olio
luca.dallolio at gmail.com
Thu Mar 16 17:39:26 EST 2006
Dieter Maurer wrote:
>Luca Dall'Olio wrote at 2006-3-16 10:01 +0100:
>
>
>>I would like to know how many anonymous users are online
>>
>>
>
>Do you know what this should mean?
>
>The server has no a priori notion which users are "online".
>
>You may artificially define the term "session"
>and then consider the number of session as representing
>the number of online users.
>If you do this and you use Zope sessions to implement your
>notion of "session", then you can look at the "session_data_manager"
>to find out how many sessions are available.
>
>
>
This would be more than enough to me, to know how many sessions are
still available.
If I could have the list of the ids of every active session, I could
easily build the list I need (by the getSessionDataByKey() method)...
I tried with something like :
<dtml-in "temp_folder.session_data.keys()">
A session.
</dtml-in>
but not even "manager" is allowed to execute that.
Even trying an External Method :
def activesessionlist( self):
return self.temp_folder.keys()
does not have any effect, instead :
def sessionperiod( self):
return self.temp_folder.getPeriodSeconds()
works right.
Could you please help me find out the list of active sessions? this is
driving me crazy...
Thank you very much, Luca
More information about the Zope
mailing list