#! /usr/bin/perl # 完全日本語版AWStats用サンプルcronファイル # # ファイルパス等は自分の環境に合わせて書き直して下さい。 # httpのログファイルをデコードした上で一時ディレクトリに格納します。 # access_log.utf8は一時的にデコードしたログを保存するファイルの名前です。 system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/utf8_decode.pl < /home/jintaro/httpd_logs/access.log > /home/jintaro/awstats65_jpn/wwwroot/cgi-bin/access_log.utf8"); # awstats.plが切り詰めないオリジナルのログを切り詰めます。 open(LOG,"+ /dev/null"); # awstats.plを走らせ、htmlファイルを出力します。 # 必須ではありませんが、awstats.plを直接参照させるよりも、htmlに出力して表示す # る方が、良好なパフォーマンスが得られます。 system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=alldomains -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.alldomains.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=allhosts -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.allhosts.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=lasthosts -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.lasthosts.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=unknownip -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.unknownip.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=alllogins -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.alllogins.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=lastlogins -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.lastlogins.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=allrobots -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.allrobots.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=lastrobots -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.lastrobots.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=urldetail -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.urldetail.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=urlentry -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.urlentry.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=urlexit -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.urlexit.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=browserdetail -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.browserdetail.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=osdetail -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.osdetail.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=unknownbrowser -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.unknownbrowser.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=unknownos -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.unknownos.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=refererse -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.refererse.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=refererpages -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.refererpages.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=keyphrases -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.keyphrases.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=keywords -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.keywords.html"); system("/home/jintaro/awstats65_jpn/wwwroot/cgi-bin/awstats.pl -config=jintaro -output=errors404 -staticlinks > /home/jintaro/public_html/awstats/awstats.jintaro.errors404.html"); # アクセス可能になるように出力したhtmlファイルの権限を変更 system("chown -R jintaro:jintaro /home/jintaro/public_html/awstats");