• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Disk full because of log file

Scheduled Pinned Locked Moved Solved
Bug Reports
4
12
2.7k
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.
  • C
    Claude Girard
    last edited by Jun 23, 2016, 1:41 PM

    Hi,

    Rev 8231

    ping.class.php writes Warning messages in log file all the time.
    So file size is growing a lot.
    Here are messages:

    Jun 23 13:36:20 crim-fog FOGPingHosts[1064]: PHP Warning: fsockopen(): unable to connect to 172.20.41.231:445 (Connection timed out) in /var/www/html/fog/lib/fog/ping.class.php on line 38
    Jun 23 13:36:20 crim-fog FOGPingHosts[1064]: PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/html/fog/lib/fog/ping.class.php on line 39

    I could stop this by modifiyng lines 38 and 39 in ping.class.php like that:

    38 $fsocket = fsockopen($host,$port,$errno,$errstr,$timeout);
    39 fclose($fsocket);

    replaced by:

    38 $fsocket = @fsockopen($host,$port,$errno,$errstr,$timeout);
    39 if ($fsocket) fclose($fsocket);

    But I don’t know if this is correct, since Tom removed at symbols in this commit:
    https://github.com/FOGProject/fogproject/commit/c064e2b727869010192025102f9af3c0d8b768a3

    1 Reply Last reply Reply Quote 0
    • W
      Wayne Workman
      last edited by Jun 23, 2016, 1:42 PM

      you can also turn off the ping hosts feature altogether.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      1 Reply Last reply Reply Quote 0
      • C
        Claude Girard
        last edited by Jun 23, 2016, 2:03 PM

        Thank you for this information.
        But how can I do that ? I don’t find.

        And isn’t this ping host feature used to see green light in front of the host ?

        W 1 Reply Last reply Jun 23, 2016, 2:15 PM Reply Quote 0
        • W
          Wayne Workman @Claude Girard
          last edited by Jun 23, 2016, 2:15 PM

          But how can I do that ? I don’t find.

          Web Interface -> FOG Configuration -> FOG Settings -> General Settings -> FOG_HOST_LOOKUP

          And isn’t this ping host feature used to see green light in front of the host ?

          Yes.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • C
            Claude Girard
            last edited by Jun 23, 2016, 2:33 PM

            ok thank you

            I should open my eyes 🙂

            1 Reply Last reply Reply Quote 0
            • Q
              Quazz Moderator
              last edited by Jun 23, 2016, 3:28 PM

              The @ in front of a function simply surpresses the warning. Tom disabled that to have more verbose output to work it to make it easier to resolve problems.

              T 1 Reply Last reply Jun 23, 2016, 3:40 PM Reply Quote 0
              • T
                Tom Elliott @Quazz
                last edited by Jun 23, 2016, 3:40 PM

                @Quazz I also did it because there were a lot of calls using the @ symbol. Using @ in front of functions is actually very taxing on the server too.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                C 1 Reply Last reply Jun 24, 2016, 12:39 PM Reply Quote 1
                • C
                  Claude Girard @Tom Elliott
                  last edited by Jun 24, 2016, 12:39 PM

                  @Tom-Elliott said in Disk full because of log file:

                  @Quazz I also did it because there were a lot of calls using the @ symbol. Using @ in front of functions is actually very taxing on the server too.

                  Yes I first want to preserve my disk space 🙂
                  But pinging host is very usefull.

                  So I don’t know how to solve these warnings, I’m not a php programmer.
                  It seems that timeout in fsockopen function doesn’t work for offline hosts

                  1 Reply Last reply Reply Quote 0
                  • T
                    Tom Elliott
                    last edited by Jun 29, 2016, 10:27 AM

                    I’ve added some minor code in hope to help thwart the spamming of the log with these fclose warnings. Typically, there should be plenty of space for the root partition (/) to write its log files. What is your FOG OS’s partition layout? df -h

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    C 1 Reply Last reply Jun 30, 2016, 3:33 PM Reply Quote 0
                    • C
                      Claude Girard @Tom Elliott
                      last edited by Jun 30, 2016, 3:33 PM

                      @Tom-Elliott
                      Images are on a separate partition.
                      / partition is 12 Go, today I can see 5 Go free.
                      This is enough, but not when dozens of lines per second are written in log file.
                      And whit this one (ping), 2 warning messages are written for each host not on line.
                      It can grow rapidly.

                      1 Reply Last reply Reply Quote 0
                      • T
                        Tom Elliott
                        last edited by Jun 30, 2016, 5:41 PM

                        You could disable logging, though I’d highly recommend against it.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        C 1 Reply Last reply Jul 1, 2016, 6:27 AM Reply Quote 0
                        • C
                          Claude Girard @Tom Elliott
                          last edited by Jul 1, 2016, 6:27 AM

                          @Tom-Elliott
                          Maybe disable only warnings messages ?
                          So I mark this resolved
                          Thanks

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          1 / 1
                          • First post
                            2/12
                            Last post

                          157

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project