[kronolith] calendar statistics

Michael J Rubinsky mrubinsk at horde.org
Mon May 23 14:32:53 UTC 2016


Quoting Fernando Duarte <fduarte at gmail.com>:

> hello all,
>
> I want to know if my users are using/sharing calendars. Some basic
> statistics.
>
> How can i find the number of active calendars?

Depends what you mean by "active". For calendars that contain *any*  
events, query the storage backend directly for this information. E.g.,  
For SQL backend, look for unique calendar_id values in  
kronolith_events table. If you are talking about some kind of recent  
usage filter, you would filter on something like event_modified. Note  
that this only takes into account normal "internal" calendars.

> and fraction of shared
> calendars?

For this, you would need to query the share system. You could write a  
script to list all shares, then check each one to see if any  
permissions have been set. If you are only interested in the "active"  
calendars from above, you could just list those shares. This would be  
done via the Horde_Share library code. Depending on how often you need  
to do this, it might be easier to just query the backend directly here  
as well. Look at the kronolith_shares_* or kronolith_sharesng_* tables  
(depending on which share system you are using).



> thanks in advance.
> --
> kronolith mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: kronolith-unsubscribe at lists.horde.org



-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5751 bytes
Desc: S/MIME Signature
URL: <https://lists.horde.org/archives/kronolith/attachments/20160523/cec86426/attachment.bin>


More information about the kronolith mailing list