用AWStats分析WMS服务器日志

1- If your Windows Media / Darwin streaming Server version allows it, setup your log format to write the following fields:

如果你的WMS版本允许设置日志的格式,可以把日专设为下列格式:

  1. c-ip 
  2. date 
  3. time 
  4. cs-uri-stem 
  5. c-starttime 
  6. x-duration 
  7. c-rate 
  8. c-status 
  9. c-playerid 
  10. c-playerversion 
  11. c-playerlanguage 
  12. cs(User-Agent) 
  13. cs(Referer) 
  14. c-hostexe 
  15. c-hostexever 
  16. c-os 
  17. c-osversion 
  18. c-cpu 
  19. filelength 
  20. filesize 
  21. avgbandwidth 
  22. protocol 
  23. transport 
  24. audiocodec 
  25. videocodec 
  26. channelURL 
  27. sc-bytes 

To make the change effective, stop your server, remove old log files and restart the server.

为了使设置生效,把WMS服务停止,删除旧的日志文件,然后重新启动服务器   
Listen to streaming files and check that your new log file looks like this:

查看一个流媒体文件,然后看一下新的日志文件,它看起来是下面这样:

  1. 80.223.91.37 2002-10-08 14:18:58 mmst://mydomain.com/mystream 0 106 1 200 {F4A826EE-FA46-480F-A49B-76786320FC6B} 8.0.0.4477 fi-FI - - wmplayer.exe 8.0.0.4477 Windows_2000 5.1.0.2600 Pentium 0 0 20702 mms TCP Windows_Media_Audio_9 - - 277721 

If your Windows Media/Darwin Streaming Server version does not allow to define your log format:

如果你的WMS的版式本不允许你自定义日志格式:
Just follow instructions in step 2 directly but use the log format string found in first lines of your log files (Just after the "#Fields:" string) as value for AWStats LogFormat parameter. For example, you could have a LogFormat defined like this:

那你就直接进入第二步,分析器将使用日志文件的第一行内容(在"#Fields:"之后的内容)作为日志格式参数,例如你可能在配置文件中的LogFormat有下面这样定义:

LogFormat="c-ip date time c-dns cs-uri-stem c-starttime x-duration c-rate c-status c-playerid c-playerversion c-playerlanguage cs(User-Agent) cs(Referer) c-hostexe c-hostexever c-os c-osversion c-cpu filelength filesize avgbandwidth protocol transport audiocodec videocodec channelURL sc-bytes c-bytes s-pkts-sent c-pkts-received c-pkts-lost-client c-pkts-lost-net c-pkts-lost-cont-net c-resendreqs c-pkts-recovered-ECC c-pkts-recovered-resent c-buffercount c-totalbuffertime c-quality s-ip s-dns s-totalclients s-cpu-util"

This means you don't use the AWStats tags but AWStats can often also understand all the IIS and/or Windows Media Server tags.
这就代表你不使用awstats标记,但awstats通常能理解所有的IIS和WMS标记。

2- Then setup AWStats to analyze your Media Server log:
Copy config awstats.model.conf file to "awstats.mediaserver.conf".
Modify this new config file:

下面就来设置配置文件来分析WMS日志:

从awstats.model.conf 文件复制一个新的文件,可以起名为"awstats.mediaserver.conf"

修改新的配置文件:

  1. LogFile="/pathtomediaserver/mediaserverlog" 
  2. LogType=S 
  3. LogFormat="c-ip date time cs-uri-stem c-starttime x-duration c-rate c-status c-playerid c-playerversion c-playerlanguage cs(User-Agent) cs(Referer) c-hostexe c-hostexever c-os c-osversion c-cpu filelength filesize avgbandwidth protocol transport audiocodec videocodec channelURL sc-bytes" 
  4. DecodeUA=1 
  5. ShowMenu=1 
  6. ShowSummary=UHB 
  7. ShowMonthStats=UHB 
  8. ShowDaysOfMonthStats=HB 
  9. ShowDaysOfWeekStats=HB 
  10. ShowHoursStats=HB 
  11. ShowDomainsStats=HB 
  12. ShowHostsStats=HBL 
  13. ShowAuthenticatedUsers=0 
  14. ShowRobotsStats=0 
  15. ShowEMailSenders=0 
  16. ShowEMailReceivers=0 
  17. ShowSessionsStats=0 
  18. ShowPagesStats=PB 
  19. ShowFileTypesStats=HB 
  20. ShowFileSizesStats=0 
  21. ShowBrowsersStats=1 
  22. ShowOSStats=1 
  23. ShowOriginStats=H 
  24. ShowKeyphrasesStats=0 
  25. ShowKeywordsStats=0 
  26. ShowMiscStats=0 
  27. ShowHTTPErrorsStats=1 
  28. ShowSMTPErrorsStats=0 

Now you can use AWStats as usual (run the update process and read statistics).
现在你就可以使用AWStats来分析WMS日志了


原文参见:http://awstats.sourceforge.net/docs/awstats_faq.html#MEDIASERVER

 


 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值