Re: [Zope] how to count authenticated and anonymous users currently online ?
Luca Dall'Olio wrote at 2006-3-16 23:39 +0100: > ... >Could you please help me find out the list of active sessions? this is >driving me crazy... You find not the list but its length on the "Manage" tab of "/temp_folder/session_data". And (as you know) you can look at the source for this page to learn which method is used to determine the value. As the next step, you look at the source of this method. It is unlikely that the lower methods are available for untrusted code (you do *NOT* want that some untrusted code can look into all sessions) but in trusted code (e.g. an "ExternalMethod"), you will be able to use them. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how to count authenticated and anonymous users currently online ?
Luca Dall'Olio wrote at 2006-3-16 10:01 +0100: >I would like to know how many anonymous users are online >and also if some authenticated users are. You can do this using exuserfolder, you can effectively track the online users by setting a session limit which discounts them out after a period of inactivity. It also has support for anonymous user tracking, although there might be some minor tweaking involved to actually get a count. You need to be using cookies though. -- Andrew Milton [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how to count authenticated and anonymous users currently online ?
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 : A session. 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 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how to count authenticated and anonymous users currently online ?
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. >and also if >some authenticated users are. Same problem for authenticated users. You see them coming (because they log in) but you do not see them going. Thus, you do not know when they become offline... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] how to count authenticated and anonymous users currently online ?
I would like to know how many anonymous users are online and also if some authenticated users are. I tried with "guest counter" but couldn't make it work, and tried also to inspect temp-folder/session_data but I get a security error. Is there a way to accomplish this? Thank you everybody in advance for any hint! Luca ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )