[imp] Usage Statistics
Andrew Morgan
morgan at orst.edu
Thu Oct 2 09:08:24 PDT 2003
On Thu, 2 Oct 2003, Caylan Van Larson wrote:
> Hello,
>
> Has anyone setup mrtg to monitor horde/imp usage? If not, anyone have a good
> sql query to poll current active # of sessions?
I use the following two SQL queries:
# Get total session count
$sth = $dbh->prepare("SELECT count(*)
FROM horde_sessionhandler");
# Get authenticated session count
$sth = $dbh->prepare("SELECT count(*)
FROM horde_sessionhandler
WHERE session_data like '%authenticated%'");
I grab these once every five minutes and stick them in an RRD, using Cacti
to graph them. The first number (total sessions) is useful sometimes. If
something gets hung up in webmail (imap server down, can't login, etc),
you'll see the number of total sessions increase without an increase in
authenticated sessions.
Andy
More information about the imp
mailing list