Linux command
awstats 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Update statistics
awstats -config [virtualhostname] -update
Generate HTML report
awstats -config [virtualhostname] -output
Update statistics and generate report
awstats -config [virtualhostname] -update -output
Generate report for a specific month
awstats -config [virtualhostname] -output -month [01] -year [2024]
Display help
awstats -h
说明
AWStats (Advanced Web Statistics) is a powerful log file analyzer that generates advanced web, streaming, FTP, or mail server statistics in graphical web pages. It processes log files to provide detailed information about visitors, pages, hits, search engines, keywords, robots, broken links, and more. AWStats works both as a CGI script and from the command line. It uses a partial information file to efficiently process large log files incrementally. The tool supports log formats from major server software including Apache (NCSA combined/XLF/ELF or common/CLF format), IIS (W3C log format), and various proxy, streaming, and mail servers. Configuration files are searched in order: awstats._virtualhostname_.conf, awstats.conf, or a full path. These must be located in /etc/awstats, /usr/local/etc/awstats, or /etc.
参数
- -config _virtualhostname_
- Specify the virtual host name to select the configuration file.
- -update
- Update statistics from the log file (default action).
- -output
- Generate the main HTML report. Statistics are only updated if -update is also specified.
- -month _MM_
- Specify month for report output (01-12).
- -year _YYYY_
- Specify year for report output.
- -h
- Display usage information.
FAQ
What is the awstats command used for?
AWStats (Advanced Web Statistics) is a powerful log file analyzer that generates advanced web, streaming, FTP, or mail server statistics in graphical web pages. It processes log files to provide detailed information about visitors, pages, hits, search engines, keywords, robots, broken links, and more. AWStats works both as a CGI script and from the command line. It uses a partial information file to efficiently process large log files incrementally. The tool supports log formats from major server software including Apache (NCSA combined/XLF/ELF or common/CLF format), IIS (W3C log format), and various proxy, streaming, and mail servers. Configuration files are searched in order: awstats._virtualhostname_.conf, awstats.conf, or a full path. These must be located in /etc/awstats, /usr/local/etc/awstats, or /etc.
How do I run a basic awstats example?
Run `awstats -config [virtualhostname] -update` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -config _virtualhostname_ do in awstats?
Specify the virtual host name to select the configuration file.