最近發現 AWStats 更新統計資料檔耗時很久,現在都要拖到早上 8 點多才能完成,因此就調整了執行 AWStats 統計資料檔更新的 cron job,把執行時間往前移,沒想到改好以後連續兩天 AWStats 都沒有正確更新,查看執行結果以後發現如下的 log (這是自己把 awstats.pl 的 output 另存的 log,預設不會儲存):
Mon Aug 9 01:31:06 CST 2010 Start analyzing [mySite]
==================================================
==================================================
Create/Update database for config "/path/to/awstats.[mySite].conf" by AWStats version 7.0 (build 1.969)
From data in log file "/path/to/logresolvemerge.pl /path/to/logs |"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Error: Command for pipe '/path/to/logresolvemerge.pl /path/to/logs2 |' failed
Setup ('/path/to/awstats.[mySite].conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Mon Aug 9 01:31:07 CST 2010 Finish analyzing [mySite]
==================================================
==================================================
如果根據 awstats.pl 的 output 去查看 config file 內容、檔案存取權限,或者 AWStats 的文件恐怕也找不出甚麼頭緒,後來我發現每天要分析的 log 檔根本沒有被抓下來,因為我把 cron job 的執行時間移到比 log server 準備好 log 的時間更早了!
接下來就可以很合理的懷疑,是不是「當 log 檔不存在時」awstats.pl 就會產生以上的 output?經過測試 (執行 /path/to/awstats.pl -update -DatabaseBreak=month -config= [mySite] 指令),果然當 log 檔不存在時,awstats.pl 就會產生以上的 output!
這個錯誤訊息跟 config 檔的內容、檔案存取權限等等是完全沒關係的 ...
訂閱:
張貼留言 (Atom)
Google Spreadsheet 裡用規則運算式
最近因為工作關係,遇到要用 Google Form 及 Google Sheet 所以研究了 Google Sheet 裡的一些 function 怎麼用 首先,分享一下如何在 Google Sheet 裡用規則運算 :D
-
今天坎尼去上課老師講了一題很有趣的題目 所以回到家坎尼就順手試驗了一下 I. XOR (exclusive OR) XOR 是邏輯運算子之一,定義為: 當兩數的值不同才為 true,相同則為 false 其他相關說明可以參考 維基百科:XOR II. 程式 以往的做法會宣...
-
雖然到最後你還是沒留下你的名字... 今天就來介紹一下,如何用程式撰寫多維 矩陣乘法運算 首先要了解一下矩陣乘法的計算方式 (m1 x n1) * (m2 x n2) 結果會是 (m1 x n2)的矩陣 上例中的 n1 = m2 矩陣乘法位置互換結果就會不同 (大家可以直接點上方...
-
最近處理了一個 Session 變數會莫名消失的問題,麻煩的地方在於,這個舊系統在.NET 1.1的環境上活的很愉快,但是努力升級到.NET 2.0之後,在 某些狀況 下 Session 變數就會莫名的消失,導致權控子系統判斷為 Session Timeout,而將...
2 則留言:
Actually, this sometimes was caused by mode not right for log directory. we should change it to 755. more info here awstats installation and configuration guide on linux centos
Thanks for your feedback! It's always less error-prone to follow the installation guide step by step.
張貼留言