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

    Is it possible to include Logrotate on PfSense

    Scheduled Pinned Locked Moved General pfSense Questions
    13 Posts 5 Posters 17.1k 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.
    • Cry HavokC
      Cry Havok
      last edited by

      If you only want to rotate the squid log you can simply stick a call to "/usr/local/sbin/squid -k rotate" in /etc/crontab.

      1 Reply Last reply Reply Quote 0
      • M
        morgan14
        last edited by

        @Cry:

        If you only want to rotate the squid log you can simply stick a call to "/usr/local/sbin/squid -k rotate" in /etc/crontab.

        I saw that but my chief want to process on logrotate solution.

        So I have the package on /usr/ports/sysutils/logrotate/

        But when i try to install this package with "make install clean" i have the message : "make - command not found"

        How can I get this command ?

        1 Reply Last reply Reply Quote 0
        • H
          hoba
          last edited by

          Add the developers package or install a developers version right from the start. Btw, this is not officially supported.

          1 Reply Last reply Reply Quote 0
          • M
            morgan14
            last edited by

            I know logrotate is not officially supported but I wish it can works on pfsense  :o

            I install developper's version and I'll said you my configuration after that.

            1 Reply Last reply Reply Quote 0
            • Cry HavokC
              Cry Havok
              last edited by

              Just be warned, squid will keep writing to the old log if you rotate it with logrotate and you'll be in a world of hurt unless you restart squid or use it to rotate it's own log.

              IMO it sounds like your "chief" has a solution that's looking for a problem and isn't thinking clearly  ;)

              1 Reply Last reply Reply Quote 0
              • M
                morgan14
                last edited by

                I used logrotate yesterday and this morning a file was created name "access.log.1.gz" .

                I wish this afternoon I'll have "access.log.2.gz" .

                Do logrotate clean principal file (access.log) after he create a new one ? How it work ?

                1 Reply Last reply Reply Quote 0
                • GruensFroeschliG
                  GruensFroeschli
                  last edited by

                  Uhm… this is a forum about pfSense.
                  You are asking the wrong questions in the wrong place.
                  http://www.linuxcommand.org/man_pages/logrotate8.html
                  Why not ask uncle google if there are mailinglists/forums for logrotate?

                  We do what we must, because we can.

                  Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

                  1 Reply Last reply Reply Quote 0
                  • Cry HavokC
                    Cry Havok
                    last edited by

                    RTFM:

                    http://www.freebsd.org/cgi/man.cgi?query=logrotate&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE+and+Ports&format=html

                    1 Reply Last reply Reply Quote 0
                    • M
                      morgan14
                      last edited by

                      sorry guys I'll search by myself  ;)

                      Thanks a lot for all

                      1 Reply Last reply Reply Quote 0
                      • G
                        grndhog3rd
                        last edited by

                        @morgan14:

                        sorry guys I'll search by myself  ;)

                        Thanks a lot for all

                        Edit /usr/local/pkg/squid.inc

                        $conf .= <<<eod<br>icp_port $icp_port

                        pid_filename $pidfile
                        cache_effective_user proxy
                        cache_effective_group proxy
                        error_directory $errordir
                        visible_hostname $hostname
                        cache_mgr $email

                        access_log $logdir_access
                        cache_log $logdir_cache
                        cache_store_log none
                        shutdown_lifetime 3 seconds
                        logfile_rotate 31  <<–- add option here

                        EOD;

                        I have mine set for 31 rotations.</eod<br>

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