[mapserver-users] mapserver logging

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Mon May 10 05:05:18 PDT 2010


Hi,

Look at the Mapserver documents it your users are sending Mapserver CGI calls and from Mapserver and OGC documents if they are doing WMS requests. It may be harder to deside what to search from the logs if you are running some program on the server that is sending the final requests to Mapserver.  It is not trivial to analyse WMS calls either.  Lines may be long and look odd, like this one including user style as SLD_BODY

ip.ip.ip.1 - secured [05/May/2010:09:42:02 +0300] "GET /cgi-bin/securedwms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=512&HEIGHT=642&LAYERS=testtest1&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=316699.16841900314,6691568.0,345950.9565809969,6728247.0&SRS=EPSG:3067&STYLES=&SLD_BODY=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3CStyledLayerDescriptor%20version%3D%221.1.0%22%3E%3CNamedLayer%3E%3CName%3Etesttest1%3C%2FName%3E%3CUserStyle%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CName%3ERule%201%3C%2FName%3E%3Cogc%3AFilter%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3test%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3test%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AFilter%3E%3CPolygonSymbolizer%3E%3CStroke%3E%3CCssParameter%20name%3D%22stroke%22%3E%23000000%3C%2FCssParameter%3E%3CCssParameter%20name%3D%22stroke-width%22%3E5%3C%2FCssParameter%3E%3C%2FStroke%3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%3E%23FF0000%3C%2FCssParameter%3E%3CCssParameter%20name%3D%22fill-opacity%22%3E1%3C%2FCssParameter%3E%3C%2FFill%3E%3C%2FPolygonSymbolizer%3E%3C%2FRule%3E%20%3C%2FFeatureTypeStyle%3E%3C%2FUserStyle%3E%3C%2FNamedLayer%3E%3C%2FStyledLayerDescriptor%3E& HTTP/1.1" 200 4298

However, you can start by calculating the number of GetMap calls. Next you can try to anylyze which layers are most popular but then you need to deside how handle requests like "&layers=layer_1,layer_2", "&layers=layer_2,layer_1" or "&layers=layer_3,layer_1,layer_2". It may also be hard to say from the logs if someone who asked for layer_1 ever got it. Request could have been outside the extents of the layer or then the request was not between the scale range.

You can sum up the number of bytes you have sent. However, sometimes it could make more sense to count the number of pixels sent by multiplying WIDTH x HEIGHT because maybe compressed jpeg image is worth about as much for the end user as uncompressed 24 bit png.  Or perhaps some statistics about BBOX suit your need better.

I fear that for getting an answer to question "How many zoom actions" you must do some harder research. Mapserver or Apache do not know if someone is zooming or panning. I think I would take a sample and sort requests by the IP address and then try analyze by the timestamps how ofter users are making actions on a map. I suppose users could be classified to a few groups by their map activity.  Then I would take a smaller sample from each group and repeat line by line all the requests and see what they really made on a map and try to understand why.


-Jukka-

Chantal Rosmuller wrote:

 
> Thank you Jukka,
> 
> I am familiar with awstats but I would also like to analyse 
> information about 
> actual mapserver actions, like "ḧow many zoom actions". Your 
> tip is helpful 
> because indeed I see a lot of mapserver actions in the 
> requested url in the 
> apache log file. Can I find the meaning of all the get 
> variables somewhere in 
> the mapserver documentation?
> 
> 
> 
> Op maandag 10 mei 2010 12:16:25 schreef Rahkonen Jukka:
> > Hi,
> > 
> > There are two kind of logs. The one that Lars is referring 
> to is so called
> >  Mapserver errorfile and while it is good for debugging it 
> cannot be used
> >  for making statistics about visitors etc.  Webserver 
> statistics can be
> >  made from the http server log files.  For example in MS4W 
> installations
> >  http logs can be found from D:\Program 
> Files\ms4w\Apache\logs. What will
> >  be logged into these log files is configured in the Apache 
> httpd.conf
> >  file.
> > 
> > Apache log files suit well for analysing WMS usage because 
> requests are
> >  coming through http GET method and then almost everything 
> gets stored into
> >  the log.  If requests are coming though POST then Apache 
> access.log does
> >  not give as much information.
> > 
> > There are many tools for analysing http server logs. Any 
> search engine will
> >  return you lots of reading if you have a try with "http 
> log analyze". I
> >  have been using AWStats and even the AWStats demo report 
> gives useful
> >  numbers about the number of visitors, bandwidth, top ten 
> IP addresses of
> >  the visitors etc.  Perl programmer could make a report 
> that suits better
> >  for making statistics about Mapserver usage. I would start 
> by searching
> >  where the Apache access.log file is and having a look at 
> it with some text
> >  editor.
> > 
> > 
> > -Jukka Rahkonen-
> > 
> > > -----Alkuperäinen viesti-----
> > > Lähettäjä: mapserver-users-bounces at lists.osgeo.org
> > > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta 
> Lars Lingner
> > > Lähetetty: 10. toukokuuta 2010 12:35
> > > Vastaanottaja: mapserver-users at lists.osgeo.org
> > > Aihe: Re: [mapserver-users] mapserver logging
> > >
> > > On 10.05.2010 11:20, Chantal Rosmuller wrote:
> > > > Hi list,
> > > >
> > > > I have a few questions about mapserver logging,
> > > >
> > > > Where can I change the log file location and logging verbosity?
> > > >
> > > > Where can I find documentation about the logfile syntax?
> > >
> > > The debug parameter is described here:
> > > http://mapserver.org/mapfile/map.html
> > >
> > > > I would like to analyse the logfiles (get some statistiscs
> > >
> > > about amount of
> > >
> > > > visitors etc) is there software or a script for that or
> > >
> > > should I write one
> > >
> > > > myself?
> > >
> > > I'm not aware of such an script.
> > >
> > > Lars
> > > _______________________________________________
> > > mapserver-users mailing list
> > > mapserver-users at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > 
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > 
> 


More information about the MapServer-users mailing list