The merge log file can use Bash's sort command:
#sort " " 4 -o log_all access*.log
You can also use the logresolvemerge.pl provided by Awstats
#perl /usr/local/awstats/tools/logresolvemerge.pl-dnslookup= -showsteps access*.log >log_ All
-showsteps indicates that the progress is shown every 8192 lines.
The-dnslookup=100 represents DNS resolution of the Access IP with 100 threads.
The above command merges the logs that need to be analyzed into a single log_all file
#Perl awstats_configure.pl#perl awstats.pl-config=www.mysite.com-update - showdropped -showcorrupted#perl awstats_buildstaticpages.pl-config=www.mysite.com-month= -year=2016-dir=/root/mysite
Parameters to focus on:
Not viewed traffic * contains data for the UA Crawler, as well as a 404 error message for the answer code.
Awstats is used for statistical analysis, some indicators can not be analyzed, some time we need to check the relevant original log. In these cases, you might consider using the regular expression tool to analyze the log directly.
If it is a log file under Windows that uses regular expression processing under UNIX, you need to replace \ n with the end. You can use the Dos2unix command, but if there is binary data in the log, it will fail. You need to use the SED command.
#sed's/^m$/\n/g' log_all
-I indicates that the modification results are written directly to the file.
-E indicates the use of regular expressions
Awstats Log Analysis tool installation and use under Linux