darold / squidanalyzer

Squid Analyzer parses Squid proxy access log and reports general statistics about hits, bytes, users, networks, top URLs, and top second level domains. Statistic reports are oriented toward user and bandwidth control.
http://squidanalyzer.darold.net/
125 stars 36 forks source link

Add feature to mention date range for reports. #168

Closed amishmm closed 6 years ago

amishmm commented 7 years ago
  1. Add feature to mention date range for reports. Sometimes one may need reports for a specific period. The above feature does exactly that. Date range can be specified as YYYY/MM/DD HH:MM:SS or simply YYYYMMDDHHMMSS too.

  2. Add feature to mention a different output directory. This allows reports for specific date range (as per 1 above) to be stored elsewhere instead of main directory.

  3. Add feature to have CustomTitle just like CustomHeader. Squidanalyzer allows to change CustomHeader but does not allows to change Page title. This feature makes it consistent. So that administrator can have Header and Title look same.

  4. Ignore SIGHUP signal too. If you run squidanalyzer over huge log file and switch it to background and then logout of your terminal then SIGHUP is sent to squidanalyzer - killing the background squidanalyzer process. This stops it.

Also if you call Squidanalyzer via CGI (Apache server/web browser) and if end user stops page loading in the browser. Then Apache sends SIGHUP which kills Squidanalyzer abruptly. This stops it.

Overall its better to ignore SIGHUP to avoid unexpected / incomplete results.

  1. Some bug fixes and optimization. There were minor bugs which are fixed. Also some unnecessary checks have been removed to run code slightly faster.
darold commented 6 years ago

Sorry for the long delay to apply this PR. I was first wanted to merge options --start and --stop with the new options --startdate and --stopdate but obviously time is missing. I will do that later. Thanks a lot for this PR.