Hi Ian,
Ian Holsman wrote:
>
> Hi.
>
> I was looking over the code, trying to see how hard it would be to
> implement stats on a virtual host basis.
Over time I have done some of this with the SNMP modules available.
In there I also need vhost oriented statistics. What I ended up with
is using the loging hook to send a UDP-based packet to a collector,
SNMP-agent. The only thing I did not do was make the statistics
available via the HTTP server itself (only via SNMP).
>
> from what I can see the modification would be
>
> a) add some fields to the vhost record
> b) change ap_increment_counts to add the request stats to the corresponding
> vhost.
> c) change mod_status to show the stuff.
> d) add some config directives to turn it on.
>
> the only problem I can see is in race conditions happening when 2 threads
> try to update the same vhost fields.
> is this actually a problem ???
> is 'a += X' thread safe ?
> if it isn't .. would we care... we could get some pretty usefull estimates
> regardless.
>
> so what do you guys think? should I submit a patch which implements this?
Why not?? I am curious how you would do this.
>
> Cheers
> Ian