Re: number of bytes/packets sent/received

2008-10-09 Thread Sorin Manolache
On Thu, Oct 9, 2008 at 14:40, Andrej van der Zee <[EMAIL PROTECTED]> wrote: > Hi, > > I was wondering what would be the right way to get the number of bytes > / packets that are sent / received in an Apache module for httpd-2.1 > and higher (including the HTTP headers). Check server/core.c and ser

Re: number of bytes/packets sent/received

2008-10-09 Thread Sorin Manolache
On Thu, Oct 9, 2008 at 15:11, Sorin Manolache <[EMAIL PROTECTED]> wrote: > On Thu, Oct 9, 2008 at 14:40, Andrej van der Zee > <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I was wondering what would be the right way to get the number of bytes >> / packets that are sent / received in an Apache module for

RE: number of bytes/packets sent/received

2008-10-09 Thread Houser, Rick
Insurance Systems Support (517)703-2580 -Original Message- From: Andrej van der Zee [mailto:[EMAIL PROTECTED] Sent: Thursday, October 09, 2008 8:41 AM To: [EMAIL PROTECTED] Subject: number of bytes/packets sent/received Hi, I was wondering what would be the right way to get the numbe

Re: number of bytes/packets sent/received

2008-10-09 Thread Andrej van der Zee
Thanks for your reply! > > Giving it a second thought, the problem looks complicated. Such > filter-based counters would count the traffic of _one_ apache process. > When you increment the counter, you have to protect it from concurrent > access by other threads running in the same apache child pr

Re: number of bytes/packets sent/received

2008-10-09 Thread Dave Ingram
> I forgot to mention, but I need the number of packets / bytes per HTTP > request and log it to a database with other information. So I guess > that would take case of all the hairy stuff. I think I will give it a > go as you recommend with an input and output filter that only counts > the bytes

Re: number of bytes/packets sent/received

2008-10-09 Thread Andrej van der Zee
Hi Dave, > > Would mod_logio be at all helpful? > > http://httpd.apache.org/docs/2.2/mod/mod_logio.html > > I haven't looked into it, but the source might give you some ideas. You > may even have a direct solution if you use a module that logs directly > to a database. I must admit that I don't kn

Re: number of bytes/packets sent/received

2008-10-09 Thread Andrej van der Zee
Hi, > > No, the Content-Length doesn't include the size of the headers. > Yes of course, but you could add the length of all r->headers_in. I just wondered if the content-type reflects the actual size, for example if the request is compressed. > While I was typing the message, Dave Ingram's mess

Re: number of bytes/packets sent/received

2008-10-09 Thread Dave Ingram
>> Would mod_logio be at all helpful? >> > You really made it easy for me huh? Thanks alot. > No use in doing more work than you need to ;-) To be honest, I only found out about it today while researching some obscure logging options. A quick search reveals that there are some modules ou

Re: number of bytes/packets sent/received

2008-10-09 Thread Andrej van der Zee
Hi, > > A quick search reveals that there are some modules out there that do log > to databases, but I don't know how well-maintained they are (mod_log_sql > only mentions Apache 2.0, for example) or how much work they would be to > use (an O'Reilly page >

Re: number of bytes/packets sent/received

2008-10-09 Thread Dave Ingram
>> A quick search reveals that there are some modules out there that do log >> to databases, but I don't know how well-maintained they are (mod_log_sql >> only mentions Apache 2.0, for example) or how much work they would be to >> use (an O'Reilly page >>