[imp] Reporting information from memcached.

Michael M Slusarz slusarz at horde.org
Tue Mar 24 22:23:01 UTC 2009


Quoting robert sand <rsand at d.umn.edu>:

> Thanks.  That is helpful.  I did modify a script I found on the horde
> site that cleans the lock files made by horde.
> Using the session id as a key you can tell if the session is still
> available in the memcached server.  If you consider
> each session id to be a user then you can get an approximate count of
> the number of valid sessions in the memcached
> server and the total number of sessions (users) in a given period of
> time.  I only clean the lock files once per day so
> it would be a 24 hour period.  Below is a copy of the modified script.

This will only work with older versions of Horde.  Newer versions of  
Horde no longer use lock files (for obvious reasons - it will not work  
over multiple servers which is the primary reason to use memcache in  
the first place).  The memcache session handler now does all locking  
via memcache itself.

Horde provides a way to count active memcache sessions, but you have  
to enable tracking in Horde's config file.  The script to count active  
sessions (which should work on any sessionhandler backend) is at  
framework/SessionHandler/scripts/horde-active-sessions.php

michael

--
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list