Erinevus lehekülje "AWstats" redaktsioonide vahel

Allikas: Kuutõrvaja
29. rida: 29. rida:
 
   Found 0 old records,
 
   Found 0 old records,
 
   Found 113343 new qualified records.
 
   Found 113343 new qualified records.
 +
 +
Here are the Awstats LogFormat values:
 +
1 - Apache or Lotus Notes/Domino native combined log format (NCSA combined/XLF
 +
2 - IIS or ISA format (IIS W3C log format). See FAQ-COM115 For ISA.
 +
3 - Webstar native log format.
 +
4 - Apache or Squid native common log format (NCSA common/CLF log format)
  
 
Kui logiformaat erineb
 
Kui logiformaat erineb

Redaktsioon: 29. aprill 2011, kell 12:56

Lihtne konfiguratsioon tekitada kaustadesse kas /etc/awstats võo /usr/local/etc/awstats nimega awstas.zoo.tartu.ee.conf

LogFile="/srv/log/serverid/zoo/http_access.log"
DirIcons="/awstatsicons"
SiteDomain="zoo.tartu.ee"
LogFormat=1
DNSLookup = 1
HostAliases = "www.zoo.tartu.ee"

Selle käivitamine

/usr/bin/perl /usr/local/www/awstats/cgi-bin/awstats.pl -config=zoo.tartu.ee -update

tulemus

# /usr/local/www/awstats/cgi-bin/awstats.pl -config=zoo.tartu.ee -update
Create/Update database for config "/usr/local/etc/awstats/awstats.zoo.tartu.ee.conf" by AWStats version 7.0 (build 1.971)
From data in log file "/srv/log/serverid/zoo/http_access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 139205
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 25862 corrupted records,log
 Found 0 old records,
 Found 113343 new qualified records.

Here are the Awstats LogFormat values:

1 - Apache or Lotus Notes/Domino native combined log format (NCSA combined/XLF
2 - IIS or ISA format (IIS W3C log format). See FAQ-COM115 For ISA.
3 - Webstar native log format.
4 - Apache or Squid native common log format (NCSA common/CLF log format)

Kui logiformaat erineb

Lihtne kuid raske pähkel, syslog kirjutab kaugelt saadetava logi puhul veel eraldi juurde infot ning LogFormat ei sobi enam.

Apr  1 00:04:35 zoo1 logger: zoo.edu.ee 46.17.96.19 - - [01/Apr/2011:00:04:35 +0300] "GET / HTTP/1.0" 200 563  "http://zoo.edu.ee/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Deepnet Explorer)" 

Juures on üleliigne esimene osa Apr 1 00:04:35 zoo1 logger:

Selle saab eemaldada customiseerides logi

LogFormat="%other %other %other %other %other %other %host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"

Siin tekib aga kohe uus probleem, nimelt kuupäevadel 1-9 on topelttühik. Seega teatab awstats Corrupted record. Seega tuleb eemaldada enne statistika loomist kõik topelttühikud.

$ sed 's/  */ /g' suuraprill.log >> suuraprill2.log