Log Parser Plus example query

Browsers accessing content, without operating system (image)

Returns a listing of browsers accessing content as a bar chart, based upon the number of requests made.
Keywords:
  • iisw3c
Statement:
logparser -i:w3c -o:chart -chartType:barstacked "SELECT CASE strcnt(cs(user-agent),'Firefox') when 1 THEN 'Firefox' else case strcnt(cs(user-agent),'netscape') when 1 THEN 'netscape' else case strcnt(cs(user-agent),'AOL') when 1 THEN 'AOL' else case strcnt(cs(user-agent),'Opera') when 1 THEN 'Opera' else case strcnt(cs(user-agent),'Chrome') when 1 THEN 'Chrome' else case strcnt(cs(user-agent),'Mobile') when 1 THEN 'SmartPhone' else case strcnt(cs(user-agent),'Safari') when 1 THEN 'Safari' else case strcnt(cs(user-agent),'MSIE+5') when 1 THEN 'IE 5' else case strcnt(cs(user-agent),'MSIE+6') when 1 THEN 'IE 6' else case strcnt(cs(user-agent),'MSIE+7') when 1 THEN 'IE 7' else case strcnt(cs(user-agent),'MSIE+8') when 1 THEN 'IE 8' else case strcnt(cs(user-agent),'MSIE') when 1 THEN 'IE other' else case strcnt(cs(user-agent),'bot') when 1 THEN 'Bot' else case strcnt(cs(user-agent),'spider') when 1 THEN 'spider' else case strcnt(cs(user-agent),'PutHTTP') when 1 THEN 'PutHTTP' else case strcnt(cs(user-agent),'Mozilla/4.0') when 1 THEN 'Mozilla/4.0 other' ELSE 'Unknown' End End End End End End End End End End End End End End End End as Browser, COUNT(cs(User-Agent)) as Hits INTO Browsers.jpg FROM *ex1107*.log GROUP BY Browser ORDER BY Hits ASC"
Notes: Query written and provided by Chevis L. Nelson (drcheeves [at] yahoo.com). Leave a comment on this query.

View more examples.


blog comments powered by Disqus