Skip to Content

Awstats for SAP systems

I have always lacked the feature of eg apache where the web server generated an accesslog which I then could attach to an awstats server.

But one day I decided to dig down to the logging feature and realized that it might be possible to have the ICM to generate an access log.

As I see it, it is not the import of the log that is the problem, it is the generation of the log that is cumbersome.

To make sure that all relevant fields are added to the log entry.


Authorization to change system parameters

Web server that contains awstats (

Step 1:

Analyse logging parameters.

Quite straight forward.

Compare the SAP standard with the Apache standard log settings.


No real default, but CLF and CLFMOD are proposed:

CLF – %h %l %u %t “%r” %s %b

CLFMOD – %h %l %u %t “%r2” %s %b


LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”” combined


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

Step 2:

Decide on parameters to include.

I am very interested in the referrer and User agent so that must be included.

That means to enhance the SAP string with more parameters.

Comparing the name with wanted feature gave me following list of parameters.

LOGFORMAT=%h %l %u %t “%r” %s %b “%{referer}i” “%{user-agent}i”

Step 3:

Activate Logging

Activate logging is done by adding the logging parameter to the instance profile via RZ10.

This is my setting:


I also want the log file name to change name everyday .

Now the server needs to be restarted. (Eventually just restarting ICM is enough).

And the log file is generated.


Step 4:

Generate awstats

With the logs present we can now generate our awstats page.

And since I replicated another log I had for another server I could easily clone the config and automate the generation.


I have attached an example HTML which unfortunately have image and other links broken.

But feel encouraged that it is possible to generate awstats from an SAP-system and do return with your comments and improvements.

Both the ABAP system as well the Java system has this logging feature. I have only tested the ABAP server, yet.

Good luck


Be the first to leave a comment
You must be Logged on to comment or reply to a post.