Custom script to comb through access_log

Custom script to comb through access_log

Post by K » Thu, 31 Jan 2002 21:31:17



I am in search of some cgi code that can limit the bandwidth used per hosted
account on a periodic basis and would like some advice/pointers as to where
to go.

Basically I need a custom cgi script running via cron every 15 minutes or so
to count up the bandwidth used per account on my machine by combing through
apache's access_log file.  If it goes over a certain limit, say 10mb per
hour, it would chmod the directory 000 or something like that for the next
hour.

Is there such an existing script out there or resources I can go to that has
existing code to parse through apache's logs?  If anyone's interested in
writing up such code for a fee I'd be interested to hear from you as well.

 
 
 

Custom script to comb through access_log

Post by Mark Taylo » Thu, 31 Jan 2002 21:45:12




Quote:> I am in search of some cgi code that can limit the bandwidth used per
> hosted account on a periodic basis and would like some advice/pointers
> as to where to go.

> Basically I need a custom cgi script running via cron every 15 minutes
> or so to count up the bandwidth used per account on my machine by
> combing through apache's access_log file.  If it goes over a certain
> limit, say 10mb per hour, it would chmod the directory 000 or something
> like that for the next hour.

> Is there such an existing script out there or resources I can go to
> that has existing code to parse through apache's logs?  If anyone's
> interested in writing up such code for a fee I'd be interested to hear
> from you as well.

I'm curious why you would want to do it this way?  Apache does have a
mod_throttle module. Do you have some other goal in mind that prevents you
from using that?

Mark
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net

 
 
 

Custom script to comb through access_log

Post by Paul Rubi » Thu, 31 Jan 2002 21:49:20


I think mod_throttle does what you want by just tracking bandwidth
per user in the running server, without messing with log parsing.
 
 
 

Custom script to comb through access_log

Post by K » Thu, 31 Jan 2002 21:51:32


Quote:> I'm curious why you would want to do it this way?  Apache does have a
> mod_throttle module. Do you have some other goal in mind that prevents you
> from using that?

Yes I know of mod_throttle.  However what I need is to restrict total
bandwidth on a per account basis.  And I'd also like the account holder to
know that his site has gone over rather than for him to think the server is
slowing down.
 
 
 

Custom script to comb through access_log

Post by Matt Kin » Fri, 01 Feb 2002 04:42:19


If your virtual sites have their own access logs, set mod_throttle up to
only track it on that access log.  I have it set up the same way. I have a
few sites that I only allow 250MB worth of traffic per day.  It then
resets itself.

mod_throttle is really cool and very easy to use, it will do what you are
asking.

Matt


> I am in search of some cgi code that can limit the bandwidth used per

hosted> account on a periodic basis and would like some advice/pointers as
to where> to go.
Quote:

> Basically I need a custom cgi script running via cron every 15 minutes

or so> to count up the bandwidth used per account on my machine by combing
through> apache's access_log file.  If it goes over a certain limit, say
10mb per> hour, it would chmod the directory 000 or something like that
for the next> hour.
Quote:

> Is there such an existing script out there or resources I can go to that

has> existing code to parse through apache's logs?  If anyone's interested
in> writing up such code for a fee I'd be interested to hear from you as
well.>
 
 
 

1. Execution of SQL Script thru shell script

hi all,
I have a piece of SQL code(some insert statement). Unix server. Oracle
DB.
I need to execute the sql code in the unix shell ... as in as a part
of a batch process...

i have a loginid password... for oracle
i believe that there is some sql command that can be embeded in the
shell script ? ne one aware ?

something like
sqlplus username/password ...
statement to execute sql file...
i need exact syntax...

Any help is appreciated !
regards

2. select() returns 1 but fails

3. NPH-Scripts and access_log

4. Q: standard method of tracking location of X-server?

5. Looking for Perl script to capture/summarize access_log data

6. Does anyone know of existence of PAM modules for Apache or Netscape?

7. mel scolds the can within hers and actually combs

8. mozilla question

9. Magitronic I-E16-comb-5S ethernet card

10. Is 64-bit Linux "true" 64 bit thru-and-thru??

11. Passing commands thru a shell script

12. custom jumpstart drops to interactive install, ignores custom config

13. Changing password thru a script