LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-24-2003, 06:36 PM   #1
John Webb
LQ Newbie
 
Registered: Jul 2003
Posts: 1

Rep: Reputation: 0
Question Limiting Access_log Size


I want to use Analog to analyze the volume of traffic on a remote Apache Server. The problem is that the log file (access_log.07-25-03 in this case) is too big & takes too long to download (& it's the smallest log file in there at 16.9MB - other log files (access_log & access_log.1 through 4) are upto 1.99GB - must be cumulative monthly files).

On the Win2K Servers, I run Analog on files that are created every half hour like ex03072422.log- the retrievals are fast, & I can spot & block abusers fairly quickly. I need the same efficiency on the remote Linux box. I was thinking I could setup an hourly CRON job to use logrotate to write hourly files. Currently it looks like the shortest interval is daily.

The other question is... once I am able to analyze abusers on the Linux box, how do I block them? On the Win2K servers we block specific user IP's, etc. with BlackIce. Not sure if the Linux box would require additional software or if there's something built in.

In any case, our developer who setup that box is too busy, & as you can tell I'm pretty clueless as to how to implement what should be some fairly simple changes/additions.

Any help would be much appreciated. Thanx in advance - John
 
Old 07-24-2003, 07:55 PM   #2
homestead1000
Member
 
Registered: Jul 2003
Location: San Diego, CA USA
Distribution: RH 7x,8x,9x, RHE 3, Fedora Core1
Posts: 38

Rep: Reputation: 15
I'm not sure what would be the right answer for you but I'll tell you what I do and maybe it'll spark an idea or two.

My apache logs grow to about 130meg daily. That's right daily! I rotate them each night and run webalizer against them. This works pretty well for giving me fairly nice reports based on many different criteria.
One problem I have is a lot of "GET" and "POST" in my urls as well as we use a sessionID for tracking a user while logged in to the site. These lines appear to webalizer as unique URLs and I have to parse the files before running them through webalizer otherwise it makes really huge "current" file and consumes all memory as it runs daily.

I'm not sure what you could use to dynamically nab IP's and block abusers but as far as generating usage reports give webalizer a shot. It's easy to configure and run through cron.

Ed
 
Old 07-24-2003, 08:06 PM   #3
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
You can override it in apache httpd.conf:

comment out the original log statement

and

CustomLog "|usr/sbin/rotatelogs/ /var/log/httpd/access_%m_%d_%y_%H_%M.log 1800" combined

You need the quotation marks
Thats the pipe symbol at the start after the opening quotation mark
The path to the location of rotatelogs comand may differ on your system
And obviously where you want to store the log
1800 is the number of seconds everytime it'll be run - 30 minutes

Space between the two paths

Bedtime for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Folder Max Size and Limiting SSH access to home folder. Mefistofeles Linux - General 4 11-26-2005 03:09 PM
limiting the size of emails that can be sent with sendmail nazzymac Linux - Networking 3 10-30-2003 02:45 PM
Limiting the size of a log file ganninu Linux - General 1 09-18-2003 09:23 AM
limiting the size of each directory sophie Linux - Newbie 1 07-24-2003 12:49 PM
limiting the size of a directory chandan Linux - Newbie 1 06-30-2003 06:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration