I recently took over maintaing a webserver running IIS 6.0 and Awstats is already installed on the box. Is there a guru that can step me thru getting it to run? The directories are set up as follows on the server:
There is an AWSTATS directory (the cgi-bin is here – L:\\AWStats\\wwwroot\\cgi-bin); There is a separate WEBSTATS directory, which contains what appear to be saved html result pages grouped by month & year. There is also of course the separate INETPUB directory containing the website.
If possible I want to run the html results from the browser and save them in the WEBSTATS directory with the past results. Can someone please step me thru what I need to do to get it to run? I'm a complete awstats noobie.
I am not sure about what was working, what is still working and what is not working anymore at your site. For example, I do not know if the stats are still automatically updated and if you can browse the HTML pages in the WEBSTATS directory.
The HTML pages in the webstats directory are not auto-updated (there is nothing in the folder since he left) – It looks like my predecessor just manually ran AWSTATS at the end of each month to get the stats.
I'm assuming everything is still functional tho, just a matter of the right commands, etc, to make it run. It looks like there's a way to manually do it in the browser and output an html result, which I can then save every month.
Any thoughts on the correct command for this? Nothing I've tried has worked so far.
You can manually update the stats if there is an "Update now" link at the top of your AWStats reports, but this link is never available in static HTML reports (the reports that are in your WEBSTATS directory). You might have this link if you can run http://www.your_site.com/cgi-bin/awstats.pl?config=your_config_name from the browser. Even so, I would not click this button before I exactly know which log file will be processed when updating.
You should look in your AWStats config file and find the value of the LogFile directive. There are comments in the config file that explain how to set the LogFile directive. Take into account that AWStats update must always begin with the oldest file. If you use a newer log file first, you will not be able to update the past days.
You can also run the AWStats update from the command line and this allows the use of a -LogFile=C:\\path_to_log_file option that is easier to use. From the command line, you should have something like this:
The command I gave will create or update the AWStats database files, but it will not create the HTML reports. When the database is updated, it will be easy to create the new HTML reports.
The AWStats database files are in the DirData directory, as defined in your AWStats config file.
ex%YY-4%MM-4%DD-4.log in the LogFile directive means that the year, date and month in the log file name must be "time of update - 4 hours".
If not many days are missing, you can run the necessary updates specifying the correct log file name in the command line. Say ex081024.log , then ex081025.log , ex081026.log and ex081027.log .
It looks like the database may be getting updated. I checked the \\AWStats\\data folder and I did find a txt file named "awstats102008.stuff.txt" which would appear to point toward a recent update.
Assuming a config name of stuff.org, would your command to run (for 10/20/08) be one long string as follows:
perl awstats.pl -config=stuff e -LogFile=C:\\WINDOWS\\system32\\LogFiles\\W3SVC1\\ex102008.log -update
The \\AWStats\\data folder definitely appears to be getting updated automatically on the 20th of every month. It contains files ranging from "awstats012004.txt" to "awstats102008.txt"…
Now that I know this, is it easy enough to run the report for stuff.org for say, the month of September 08?
Look at "III. Run reports: Building and reading reports" in AWStats Installation, Configuration and Reporting. As explained, you can generate each section separately or use awstats_buildstaticpages . Don't forget to use the -month=MM -year=YYYY options if you do not generate the report for the current month.
Well, I've found that logs are being auto-updated but now cannot for the life of me get this thing to execute. I've logged onto the webserver ctl prompt and typed the following: (assuming domain is www.stuff.org – latest log file is “awstats102008.stuff.txt“):
The resulting message is “Can't open perl script “awstats.pl”: No such file or directory“
Have also tried running it “in the browser” but every combination I type in yields no results at all. Obviously the command above must not be correct – Anyone see where I'm going wrong??
The command you tried to run is not a command that generates the HTML files. There is no need to mention a log file in this step. Please refer to "III. Run reports: Building and reading reports" that I mentioned in my previous post.
The error message you got is coming from the fact that Perl does not find the awstats.pl in the directory where it looks for it. Use the absolute path to awstats.pl in the command and Perl will find it.
I've scoured "III. Run reports: Building and reading reports” and maybe have applied incorrect syntax somewhere because none of them run.
Given the name of my domain (www.stuff.org) & log file (D:/awstats/data/awstats102008.stuff.txt) can you tell me what the exact syntax of the command should be? That's where I'm having my problem and the documentation is very unclear to someone unfamiliar with the program.
I just want to produce the html output reports like the ones my predecessor produced.
- if there is a date stamp in the file name, this must be specified in the -staticlinks option together with the site name. In your example, it is -staticlinks=stuff.092008
- the date stamp will be inserted exactly like this : awstats.stuff.092008.urldetail.html . So you need to specify the destination file name in the same format ("092008" before "urldetail")
It outputs a report but doesn't show me the popularity ranking of all the pages on the website (still just the top 10). Is there another command (aside from urldetail) that will report the popularity of the separate pages on the site?