Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    SquidGuard - squidguard_log.php - does not show all line (offset problem !?)

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 3 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      Nachtfalke
      last edited by

      Hello,

      I have some problems with the number of lines in the "Blocked" section of squidguard.
      I increased the time of the logrotation from "every day" up to "every sunday" in the squidguard_configurator.inc. There a cron job will created.
      After that I changes the little part which creates the batch file which will run the logrotate. I changed the number of lines from 1000 up to 20000.

      I checked this log file:

      /var/squidGuard/log/block.log
      

      And it has more than 1700 lines.

      If I go to SERVICES -> PROXY FILTER -> LOG -> Blocked
      I can just see the lines 0-49, 50-99, 100-149 - not more.

      I chnged the offset from 50 up to 500 in

      /usr/local/www/squidGuard/squidguard_log.php
      

      Now I can just see the lines 0-499 - not more.

      Can anybody help me with that ? I just really want to see all the lines from the last week.

      Thank you for your help in advance!

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Just a guess but it might be this in squidguard.inc (around line 1267)

        define('LOGSHOW_BUFSIZE', '65536');
        

        It only reads that many bytes of the log file, if I'm reading the code right.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • D
          dvserg
          last edited by

          I'm not sure what is required viewing of all the log. This requires more system resources for large logs.

          SquidGuardDoc EN  RU Tutorial
          Localization ru_PFSense

          1 Reply Last reply Reply Quote 0
          • N
            Nachtfalke
            last edited by

            Increasing the buffersize helped to 2097152 bytes (2MB) helped. I can now watch ~1500 entries.

            @dvserg
            Limiting the size is very important and a good thing. But I do have so many entries in the "blocked" file that I am not able to watch back more than one day. That's the reason why I would like to increase the buffer a little bit. Perhaps you can find a way to implement an option to modify the buffer size and the lines in the logfile when doing a logrotate.

            Thanks both of you for your help!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.