Use Webalizer Analysis Web Logs (FreeBSD)

xiaoxiao2021-03-06  51

Use Webalizer Analysis Web Logs (FreeBSD)

Http://www.yesky.com/20011010/200376.shtml

First, introduce Webalizer is an efficient, free web server log analysis program. Its analysis results are saved in HTML file format so that it can be easily browsing through the web server. Many sites on the Internet use Webalizer to analyze the web server log analysis. Webalizer has some features: 1. Because Webalizer is written with C, it has high operating efficiency. On a machine with a 200 MHz, Webalizer can analyze 10,000 records per second, so analyze a 40M size log file only take 15 seconds. 2. Webalizer supports standard general log file formats (in addition to this, several combined logfile formats) can also be a variant of combine logfile format, which can count customer situations and customer operating system types. And now Webalizer has already supported the WU-ftpd xferlog log format and the Squid log file format. 3. Support command line configurations and profiles. 4. You can support multiple languages ​​or your localization work. 5. Support a variety of platforms, such as UNIX, Linux, NT, OS / 2, and MacOS, etc. Second, install 1. From the official website of Webalizer http://www.mrunix.net/webalizer/ Download Webalizer, the current latest version is Webalizer-2.01-06-src.tgz. 2. First untich the source code package: TAR XVZF Webalizer-2.01-06-src.tgz 3. There is a lang directory in the generated directory, and a variety of language files are saved, but only the traditional Chinese version can be converted. It is a simplified, or you re-translate it yourself. 4. Then enter the resulting directory: ./configure make --with-language = Chinese

You may need a libpng library, then you need to / usr / ports / graphics / png, make Make, make install, and libraries cannot go to / usr / lib / LibPNG.so Take the / usr / lib.

A libgd library is also required, and you need to / usr / ports / graphics / gd, make Make, make install.

This is OK, it can be completed smoothly ^^. 5. After the compilation is successful, you will generate a Webalizer executable, you can copy it to / usr / sbin / directory: CP webalizer / usr / sbin / then you can start Configure Webalizer.

Third, the configuration can be configured by the command line can also be configured by the configuration file. In this article, we will introduce the use of the command line parameters to configure, you need to understand the user of the configuration file, you can refer to the Readme file, there is Very detailed introduction. Webalizer -H can be performed to get all command line parameters: usage: webalizer [options] [log file] -h = Print Help information -V -V = Print version information -D = Print Additional debugging information -f type = log format type. TYPE = (CLF | FTP | SQUID) -i = ignore history file -P = reserved status (increment mode) -Q = ignore message information -Q = ignore all information -y = ignore national graphics-G = ignore hours Statistical graphics - H = ignore the hour statistics -L = ignore color legend -L Num = Using digital background line -M num = Access timeout (seconds) -t = print time information -c file = specified configuration file - Name = use Host Name-O Dir = Result Output Directory Name = Using the file extension -p name = page type extension -i name = index alias - A Num = The first few customer types -c num = display the first few countries -R Num = display previous link -s Num = The first few customers - Ur Num = The first few urls -e num = display the first few access pages - E Num = Page in the first few do not exist - x = Hide Individual User -D Name = Use DNS Cache file-Num = DNS process number (0 = Disable DNS) Assume that the web server host is www.test.com, the statistical site domain name is www.test.com, access the log as / var / log / httpd / access_log, We output the Webalizer analysis result to / var / www / html / log. Then we can build the following scripts /etc/rc.d/webalizer: #! / Bin / sh run = / usr / sbin / webalizer $ run -f clf -p -n "" -t "www.test.com" - O / VAR / WWW / HTML / LOG / VAR / LOG / HTTPD / Access_log

Description: -f CLF indicates that our web log format is a standard general log file format (CommON logfile format)

转载请注明原文地址:https://www.9cbs.com/read-79799.html

New Post(0)