Installed AWStats On TextDrive With 1&1 Logs
Well, once upon a time, TextDrive accounts came with Urchin web statistics analysis, but i wasn’t using my TextDrive space for a while and never got to use Urchin. It was bought by Google for their Analytics system, and it no longer worked for TextDrive. I had been keeping an eye out for something else, occasionally scraping the TextDrive Forums for updates on the forthcoming “official” TextDrive stats package. No updates in a while, but several tutorials for installing AWStats which seemed to be the popular interim alternative. So i tried the one that looked easier to me: Digerati’s instructions [via].
It gave me a chance to play with SSH, which is probably good to know—i had to grab and install PuTTY to get that to work. Everything went just as prescribed. It only took maybe 15 minutes—very similar to WordPress’s simple installation. You basically just upload some files, and edit a configuration file. The last step is loading in old log data (AWStats only reads the most current log file). There’s a simple script on Digerati’s page to import the backlogs on TextDrive servers.
But i had two year’s of logs from 1&1 servers that i wanted to import. And there’s where i ran intro trouble. It seems 1&1 had to do everything differently, and their log files were in a different format that didn’t taste good to AWStats. Fortunately, digging around AWStats’ documentation got me goin in the right direction, and a post on eBooger.com mentioned the same problem and provided the correct log format. I also had to manually rename a bunch of the log files because 1&1 complied them weekly instead of daily and there were name conflicts between the two years. I also had to make sure there were no spaces in the names left over from the batch rename tool i used—the AWStats import function chokes when filenames have spaces. Once i got that all sorted out, i used Digerati’s script slightly modified to import the 1&1 logfiles from ~/logs/1and1_logs/ and removed the -rt list option so they would be imported by filename order since the datestamps were all messed up.
The original script is currently running to pull in the log data collected on TextDrive since the beginning of the year. Once that finishes, i think i need to check on the cron settings to make sure it grabs the daily log file for updates. Then i may look into one of the several “daily” analyzers suggested at the TextDrive Forums.












Yeah, at first i didn’t understand the reason for setting the time to just before midnight for the cron update, so i basically skipped a day of stats. Not to hard to fix, the AWStats’s FAQ had the answer: just delete the month with missing data, move the other data files, rerun the update to rebuild the month, then replace the other data files. Did the same for January, where there was a missing day from when i switched servers from 1&1 to TextDrive. I think everything’s running fine now.