0

我目前正在尝试修复我的日志文件以正确显示 AWStats。在我尝试让带宽出现之前,我已经完成了这项工作。我更改了 IIS 日志文件以包含 sc-bytes cs-bytes,然后进入我的配置文件并将其添加到 logformat 并为它们添加。这是格式的样子。

#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken

#LogFormat="%time2 %other %method %url         %query      %other %logname    %host %ua           %code     %other       %other          %bytesd    %other   %other"

LogFormat="%time2 %other %method %url %query %other %logname %host %ua %code %other %other %bytesd %other %other"

这是真实日志的样子

2015-06-07 00:03:07 192.168.128.125 POST /ISAPI/DLSapiWP.dll/Rest/heartbeats/ISWEEP153-1/iSweep - 80 - 173.162.54.105 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.0.10)+Gecko/2009042316+Firefox/3.0.10 200 0 0 960 1227 733

在我更改日志格式后,AWStats 似乎根本没有更新。我想念或忘记做什么?朝着正确方向的任何一点都会有所帮助。

我尝试过的事情:

  1. 删除当月的 AStats 数据历史记录。
  2. 手动运行脚本
4

1 回答 1

0

原来旧的日志文件和新的日志文件不兼容。为了使其正常工作,我需要删除所有旧日志并在新日志上运行 AWStats。但是,我能够保留旧月份的历史记录,所以我没有丢失数据。

过程:

  1. 在第一组日志上运行 AStats
  2. 删除旧日志,保留月历史
  3. 添加带有字节的新日志
  4. 在这些上运行 AStats。

旧的带宽不显示,但对于新的带宽,它们工作得很好。

于 2015-06-30T12:27:48.767 回答