Re: my log analyzer and bytes_sent are not matching
Jeremy Hansen <[email protected]> Wed, 14 Jan 2004 09:38:45 -0800 (PST)
| Newsgroups | gmane.comp.apache.mod-log-sql |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 14 Jan 2004, Chris Powell wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jeremy Hansen wrote: > | I'm trying to use mod_log_sql to calculate daily bandwidth usage stats > | for clients. I'm basically using this: > | > | select sum(bytes_sent) from `access_domain_com`; > <snip> > | What could cause this? I really need to figure this out because > customers > | are either getting charged too much or too little. > > Jeremy, > The routine used in mod_log_sql to extract the bytes sent is exactly the > same as that used in mod_log_config, Apache's text logging mechanism. > It uses the ap_bgetopt() call with the BO_BYTECT argument to extract the > bytes output to the client; so, whatever mod_log_sql says at least > agrees with whatever ordinary logging would say. Right. I'm using a dump from mod_log_sql for the log file that awstats reads. I'm not using apache logging at all at this point so the values are definitely the same. Comes from the same place. > I am not familiar enough with awstats to really offer any insight into > its behavior. I can only speculate why awstats is consistently higher > than the module, but a couple of ideas: > > * awstats is ignoring any mod_gzip compression in place; it is just > multplying the (document disk size in bytes) by (number of hits on the doc). > * awstats is somehow figuring in extra bandwidth for the HTTP headers, > which are not factored into Apache's 'bytes output' formula. > * awstats' algorithm somehow 'sees' data transfer that apache's 'bytes > output' forumula ignores or misses. > * and, of course: awstats is broken / apache's bytecount formula is broken. What analyzer do you suggest. I guess I'll try webalizer and see what numbers it comes up with. Thanks -jeremy > Regards, > Chris Powell > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFABXrqYLVoao8MjQkRAkqmAJ0Y24bQmpHMrxL5DMelUHy+A7Z8hACeLzvj > NhmQbFtE1E3NJPci+/ve3qQ= > =F+jF > -----END PGP SIGNATURE----- > > ____________________________________________________________________ > Reminder: to unsubscribe, send email to <[email protected]> > with the words "unsubscribe mod_log_sql" in the body (w/o quotes). > The module homepage is http://www.grubbybaby.com/mod_log_sql/ > The list archives are here: > http://news.gmane.org/thread.php?group=gmane.comp.apache.mod-log-sql >