Webalizer Report Generating
Step 1: login to the particular website server (eg. Mahiti.org at 192.168.x.x)
$ ssh username@hostname
Step 2: After loggen in to above server, go to apache2 folder as below:
$ cd /var/log/apache2
Step 3: execute below command to open all access.log files and find the mentionded website (mahiti.org) in all the access.log files and store in a file (linweb)
$cat access.log access.log.1 | grep mahiti.org >> linweb
Step 4: create a script file to sort the linweb file
the final file will be in jumbled time format. Webalizer stops when it reaches todays date. As a result dont forget to sort the final file so that the webalizer analyzes all the entries
$sudo vi sort.sh
Step 5: copy the below text into newly created (sort.sh) script file then save & exit.
#!/bin/sh
if [ ! -f $1 ];
then
echo "Usage: $0 "
exit
fi
echo "Sorting $1"
sort -t ' ' -k 4.9,4.12n
-k 4.5,4.7M -k 4.2,4.3n -k 4.14,4.15n -k 4.17,4.18n -k 4.20,4.21n $1
> $1.sorted
Step 6: to see the content of the file (linweb) type the below command, which is still not sorted.
$ vi linweb
$ ls -l
Step 7: run the following command to change the permission level of sort.sh file.
$ chmod 775 sort.sh
Step 8: run the following command to sort the linweb file.
$ ./sort.sh linweb
Note: the above command will create a file a sorted file as below.
linweb.sorted
Step 9: to see the sorted contents in the linweb file
$ vi linweb.sorted
Step 10: to generate a webalizer report run the following command.
$ webalizer linweb.sorted
$ ls -ltr
Step 11: run the following three commands only if webalizer application is not installed on your computer. If already installed then go to step 12 directly from step 10.
$ sudo aptitude update
$ sudo aptitude install webalizer
$ webalizer linweb.sorted
Step 12: create a folder to store the webalizer report.
$ sudo mkdir lin
Step 13: run the following webalizer command to generate & store the webalizer report into newly created folder (lin)
$ webalizer linweb.sorted -o lin/
Step 14: go to new (lin) folder and see the contents stored (there will be around five files)
$ cd lin
$ ls
Step 15: run the following command to see the webalizer report index.
$ lynx index.html
Step 16: now copy the newly created folder (i.e lin) to your computer for futher use.
$ sudo scp -r lin user@hostname:/location/location/location/.
Note: Here "linweb" & "lin" are the just examples only, you can use any name you want.
Trackback
The URI to TrackBack this entry is: http://ngoinabox.mahiti.org/howtos/archive/2010/01/22/webalizer-report-generating/trackback-
mnuuyhcs:
mnuuyhcs
mnuuyhcs
-
bactrim:
bactrim
bactrim
-
digoxin:
digoxin
digoxin
-
phentermine with:
phentermine with
phentermine with
-
ranitidine:
ranitidine
ranitidine
-
abilify:
abilify
abilify
-
acai supplement:
acai supplement
acai supplement
-
paroxetine:
paroxetine
paroxetine
-
pulmicort:
pulmicort
pulmicort
-
cheap phentermine online:
cheap phentermine online
cheap phentermine online
-
purim:
purim
purim
-
xenical online:
xenical online
xenical online
-
levitra online:
levitra online
levitra online
-
bcaa:
bcaa
bcaa
-
tegretol:
tegretol
tegretol
-
xenical online:
xenical online
xenical online
-
imodium:
imodium
imodium


