View Single Post
Old 02-07-2016, 05:44 PM   #1178
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 726
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
Quote:
Mind you, I'd be a lot happier if I knew what those byte counts represented.
From the Apache documentation:
%b: Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a '-' rather than a 0 when no bytes are sent.

Yeah thad did help

I experimented a bit with the %b values and found that different servers and different browsers and different url's all gave mostly different but not always different values of %b.
With my setup I got (at least) the following values of %b: (904, 906, 1057, 1058, 1061, 1062).
- the first 2 are with OPDS: http://cops/feed/php
- 1057 and 1061 are with url: http://cops
- 1058 and 1062 are with url's: httt://cops/ and http://cops/index.php

But your numbers differ from mine. Maybe %b is not a general solution to find unique lines in a log file?

Instead of %b I used the line
Code:
grep -e "/cops/ " -e "/cops/index.php " -e "/cops/feed.php " $LOGFILE | grep -e "200" > cops-log.txt
to find unique (succesful) logins.

However if all your "users" use the same browser and url
Code:
grep -e "200 1176" -e "200 1994" $LOGFILE > cops-log.txt
or whatever value (200 2183 ?) will work for you.


Just one question. Did you have to install anything to make mailing from your script possible or did it just work?


Greets,
Mario
mariosipad is offline   Reply With Quote