AWStats crontab incorrect?

apps

#1

I followed the wonderful instructions by Skybly for AWStats installation for DH and everything went smoothly.

Sort of.

I setup the crontab correctly per Skybly’s instructions and then changed it to make it hourly with this-

1 * * * * perl /home/etc…

I get hourly e-mails from crontab stating the following:


----- awstats_buildstaticpages 1.2 (build 1.31) © Laurent Destailleur -----
awstats_buildstaticpages allows you to launch AWStats with -staticlinks option to build all possible pages allowed by AWStats -output option.

Usage:
awstats_buildstaticpages.pl (awstats_options) [awstatsbuildstaticpages_options]

where awstats_options are any option known by AWStats
-config=configvalue is value for -config parameter (REQUIRED)
-update option used to update statistics before to generate pages
-lang=LL to output a HTML report in language LL (en,de,es,fr,…)
-month=MM to output a HTML report for an old month=MM
-year=YYYY to output a HTML report for an old year=YYYY

and awstatsbuildstaticpages_options can be
-awstatsprog=pathtoawstatspl AWStats software (awstats.pl) path
-dir=outputdir Output directory for generated pages
-diricons=icondir Relative path to use as icon dir in links
-builddate=%YY%MMÝ Used to add build date in built pages filenames
-staticlinksext=xxx Build pages with .xxx extension (default .html)
-buildpdf[=pathtohtmldoc] Build a PDF file after building HTML pages.

Output directory must contains icon directory when this option is used (need ‘htmldoc’)


Fantastic.

Odd thing is, my awstats page has not updated since the initial install yet the e-mails continue to come hourly. I know that there is a way to enable AWStats to update manually via a link on the page but I can’t quite figure out how to do it.

I’ve since changed my crontab settings back to 0 3 * * * etc. since hourly emails without updates does me no good.

Help, please?


Guns don’t kill people; gaping holes in vital organs kill people.


#2

The cron email is telling you your awstats command is wrong. It’s spitting out the usage information for it instead of running your stats. Try to run it by hand until you get the usage correct and then update your cron job.

  • Dallas
  • DreamHost Head Honcho/Founder

#3

Thanks, Dallas. The problem is, I don’t know how to run it manually. :frowning:


Guns don’t kill people; gaping holes in vital organs kill people.


#4

Here’s a link the Skybly’s instructions: http://wiki.dreamhost.com/index.php/AWStats

“Running it manually” is done at Step #9. Basically you have to type something like this at the shell:

perl /home/yourusername/awstats/tools/awstats_buildstaticpages.pl -config=example.com -update -awstatsprog=/home/yourusername/awstats/awstats.pl -dir=/home/yourusername/example.com/statistics/Where you substitute the apprioate values for those parameters. According to his instructions, you should then have the necessary pages created at http://example.com/statistics/ upon successful execution.

You might want to use Copy & Paste once you get it running from the shell, and just “Paste” it into the crontab file.

:cool: Perl / MySQL / HTML+CSS


#5

Thanks, Atropos. I once again re-ran Skybly’s instructions (steps 9-12) and they appeared to successfully run; the html files were done successfully (again) and the crontab was installed (again).

When I checked the stats, all stats came up as zeros for June and states the last time it was updated as May 31st. Odd, considering I just re-ran those steps. Twice, even.

I am sure I am missing something absolutely stupid.

I swear I am not an idiot. I just play one on DH forums. :wink:


Guns don’t kill people; gaping holes in vital organs kill people.


#6

This has been resolved with a bunch of tweaking and whatnot. Thank you.


Guns don’t kill people; gaping holes in vital organs kill people.


#7

How did you resolve this??? I have the exact same thing happening. I suspect because we followed the same directions.

Crontab sends me the same message, but no update is happening.

Thanks

-Steve


#8

Hi, when I installed it i had problems too and couldn’t figure out why I kept getting an error even though I was pasting in the correct line into the crontab.

After awhile I finally figured out what it was. I was using Putty to edit my crontab, and pasted my line of code. I thought it was using a “word wrap” thing but it wasn’t, it was pasting it as two lines instead of one.

Make sure its on one line, even if you have to type it out.


#9

I did type it all out. :confused:

But this time, I maximized the screensize and I think that may have done the trick. I’ll know better tomorrow when I check my stats and see if its updated or not. :slight_smile:


Guns don’t kill people; gaping holes in vital organs kill people.


#10

I know this is not really a timely reply, but I’ve just been going through all this to try and get awstats running on one of my domains.

If I can save anyone else the time I’ve spent figuring out what one of my problems was, well, good.

If you edit your crontab in nano using the command crontab -e, you can turn off word wrap using [Esc]-w. (Press the escape key then press the w key.)