AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 737868
Accepted
d.lanza38
d.lanza38
Asked: 2015-11-21 09:52:30 +0800 CST2015-11-21 09:52:30 +0800 CST 2015-11-21 09:52:30 +0800 CST

如何通过 cli 更改 AWSTATS 配置

  • 772

我的 Apache 日志文件的名称中包含日期,我无法更改它。有没有办法LogFile使用 Windows CMD 提示更改 AWSTATS 的配置参数?更好的批处理脚本?当然,我可以尝试查找和替换我需要的内容,但我不确定 AWSTATS 中是否有类似以下的简单 CLI 命令:

awstats.pl -config LogFile="C:\path\to\log\file"

我打算编写一个批处理脚本来更改选项,然后在一天结束处理期间更新 AWSTATS 数据库。

configuration
  • 1 1 个回答
  • 264 Views

1 个回答

  • Voted
  1. Best Answer
    d.lanza38
    2015-12-12T06:15:32+08:002015-12-12T06:15:32+08:00

    所以我意识到 AWSTATS 提供了可以用来动态表示日期的标签,这意味着您不必每天手动更改日期(无论是使用自定义代码还是LogFile每天实际更改路径)。

    # "LogFile" contains the web, ftp or mail server log file to analyze.
    # Possible values: A full path, or a relative path from awstats.pl directory.
    # Example: "/var/log/apache/access.log"
    # Example: "../logs/mycombinedlog.log"
    # You can also use tags in this filename if you need a dynamic file name
    # depending on date or time (Replacement is made by AWStats at the beginning
    # of its execution). This is available tags :
    #   %YYYY-n  is replaced with 4 digits year we were n hours ago
    #   %YY-n    is replaced with 2 digits year we were n hours ago
    #   %MM-n    is replaced with 2 digits month we were n hours ago
    #   %MO-n    is replaced with 3 letters month we were n hours ago
    #   %DD-n    is replaced with day we were n hours ago
    #   %HH-n    is replaced with hour we were n hours ago
    #   %NS-n    is replaced with number of seconds at 00:00 since 1970
    #   %WM-n    is replaced with the week number in month (1-5)
    #   %Wm-n    is replaced with the week number in month (0-4)
    #   %WY-n    is replaced with the week number in year (01-52)
    #   %Wy-n    is replaced with the week number in year (00-51)
    #   %DW-n    is replaced with the day number in week (1-7, 1=sunday)
    #                              use n=24 if you need (1-7, 1=monday)
    #   %Dw-n    is replaced with the day number in week (0-6, 0=sunday)
    #                              use n=24 if you need (0-6, 0=monday)
    #   Use 0 for n if you need current year, month, day, hour...
    # Example: "/var/log/access_log.%YYYY-0%MM-0%DD-0.log"
    # Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log"
    # You can also use a pipe if log file come from a pipe :
    # Example: "gzip -cd /var/log/apache/access.log.gz |"
    # If there are several log files from load balancing servers :
    # Example: "/pathtotools/logresolvemerge.pl *.log |"
    
    • 0

相关问题

  • 小型企业的服务器虚拟化/RAID 配置

  • httpd.conf 用于不区分大小写的文件服务

  • Windows Server 2003 DNS 添加的 CNAME 不起作用

  • 我应该使用什么策略在 linux 上安装 smtp 服务器?用于多线程服务

  • 为什么我的站点在配置为直通身份验证时使用 IUSR 帐户?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve