LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-09-2010, 12:23 PM   #1
bangsters
Member
 
Registered: May 2009
Posts: 51

Rep: Reputation: 15
quick question with awstats and my log file of 270MB


Hi.

I was wondering how I can get this done. I reinstalled my awstats and deleted my awstats data. How do I pull the data from my original access_log which is around 270MB in size.

Any suggestion? I tried updating awstats but it's timing out and I'm getting an internal server error which I assume is from the 270MB access_log size.

Thanks
 
Old 03-09-2010, 12:36 PM   #2
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Have you tried running the update script from the command line and just letting it run as long as necessary?

Regards,

Alunduil
 
1 members found this post helpful.
Old 03-09-2010, 12:38 PM   #3
bangsters
Member
 
Registered: May 2009
Posts: 51

Original Poster
Rep: Reputation: 15
that is what i'm doing now.

it's taking a while though...and i opened another console window and checked at the stats folder where awstats stores the data, still empty.

Also, how can I get awstats to work with logformat=1? Right now I am using logformat=4 because I get an error when I set it as logformat 1.

Thanks
 
Old 03-09-2010, 12:48 PM   #4
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
I haven't played with different log formats but the reason the data isn't showing up yet is that it does all of the processing in memory and will write it out when it has finished.

Regards,

Alunduil
 
Old 03-09-2010, 12:52 PM   #5
bangsters
Member
 
Registered: May 2009
Posts: 51

Original Poster
Rep: Reputation: 15
ahh.... i'll wait it and update you when process is done.

if anyone can chime it with getting logformat=1 working instead of logformat=4 would be great. from my existing data with my other sites (all logformat=4), and from what i've read online, logformat-4 does not show Browsers, OS, keywords, etc.

thanks again
 
Old 03-09-2010, 12:56 PM   #6
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Do you mean getting a customlog format to get all of that information? I may have posted what you need here: http://www.alunduil.com/2010/03/02/r...ats-on-gentoo/ but if not good luck.

Regards,

Alunduil
 
Old 03-09-2010, 01:10 PM   #7
bangsters
Member
 
Registered: May 2009
Posts: 51

Original Poster
Rep: Reputation: 15
This is what I already have i my httpd.conf

ErrorLog logs/error_log
LogLevel crit
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combin$
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log combined
ServerSignature off
 
Old 03-09-2010, 01:36 PM   #8
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Just to cover all of our bases did you restart apache after configuring that log style? Also, if the log file was created in the old format I don't think it's possible to convert it to a new style, but all new log entries will have the information you want.

Regards,

Alunduil
 
Old 03-09-2010, 02:23 PM   #9
bangsters
Member
 
Registered: May 2009
Posts: 51

Original Poster
Rep: Reputation: 15
actually that is my existing logformat settings in my httpd.conf. i have not changed it. and from the looks of that, i should be able to use logformat=1 right?

thanks
 
Old 03-09-2010, 02:56 PM   #10
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
I'm not familiar with the logformat directive but I do know that specifying a log file with the logformat works: CustomLog /var/www/localhost/log/apache/production.log combined

Regards,

Alunduil
 
Old 03-09-2010, 03:09 PM   #11
bangsters
Member
 
Registered: May 2009
Posts: 51

Original Poster
Rep: Reputation: 15
hmmm....so i should have the same logformat which is 1 (combined) in awstats based on my post above. that's weird.

also, if I change my logformat, will it break awstats or will it break anything? how should I change my formatting to suit awstats logformat=1 without breaking existing data or beter yet without breaking the box

thanks again
 
Old 03-09-2010, 03:32 PM   #12
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Those are excellent questions. Is the logformat coming from awstats or apache that you're having difficulty with (I've been probably wrongly assuming it's an apache issue)?

Regards,

Alunduil
 
Old 03-09-2010, 05:41 PM   #13
bangsters
Member
 
Registered: May 2009
Posts: 51

Original Poster
Rep: Reputation: 15
Actually I'm not so sure to be honest. I assumed it's apache as well, since AWSTATS only have 1 to 4 general options that I have there, but apache logformat has a bunch of syntax. Also, AWSTATS just pulls the apache logs and need to match with apache's format. so for awstats to work on 4 means apache is somehow configured that way despite in httpd saying it's combined (logformat=1).
 
Old 03-10-2010, 10:54 AM   #14
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Code:
# Examples for Apache combined logs (following two examples are equivalent):
# LogFormat = 1
# LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot 
quot"
#
# Example for IIS:
# LogFormat = 2
#
LogFormat=1
I stumbled across this in the awstats config I'm using.

Regards,

Alunduil

Last edited by alunduil; 03-10-2010 at 10:54 AM. Reason: Adding a Code Block
 
Old 03-11-2010, 07:04 AM   #15
bangsters
Member
 
Registered: May 2009
Posts: 51

Original Poster
Rep: Reputation: 15
yes that was what i was concerned with. if i set awstats to logformat=1 it does not work. i have to set it in awstats as logformat=4. however, as from my previous post my apache is configured for combined logging, which i believe is equivalent to logformat=1.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
awstats and several log file h725 Linux - Server 3 02-20-2009 07:36 AM
awstats problem with Postfix log file Simmo512 Linux - General 0 04-24-2008 04:26 AM
Quick question. How do I log in as root. DDRfreak2 Mandriva 10 08-12-2005 09:47 PM
Quick log question AndyMCR Slackware 2 04-27-2005 04:47 AM
quick question: boot log nakedjohn Linux - Newbie 2 06-18-2004 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:10 AM.

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
Open Source Consulting | Domain Registration