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

    Power Management - Scheduled actions

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    3
    10
    4.0k
    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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by Wayne Workman

      I’m using FOG Client 0.11.2 with FOG Trunk version 8355.

      I’ve noticed that computers in my building are not turning off overnight. I had scheduled everything to turn off at 10 pm every day. I’ve deleted all those so I can test just my desktop.

      I scheduled a shutdown at 8:30 this morning, it didn’t run. I noticed however the host time is incorrect, it’s behind by an hour. So I figured this may have caused the issue for the 8:30 shutdown. So I made another shutdown task for 7:40 - which then-would have been there in 10 minutes.

      @Joe-Schmitt

      0_1467899263346_power management.png

      ------------------------------------------------------------------------------
      --------------------------------PowerManagement-------------------------------
      ------------------------------------------------------------------------------
       7/7/2016 7:40 AM Client-Info Client Version: 0.11.2
       7/7/2016 7:40 AM Client-Info Client OS:      Windows
       7/7/2016 7:40 AM Client-Info Server Version: 
       7/7/2016 7:40 AM Middleware::Response Success
       7/7/2016 7:40 AM PowerManagement Calculating tasks to unschedule
       7/7/2016 7:40 AM PowerManagement Calculating tasks to schedule
       7/7/2016 7:40 AM PowerManagement --> A shutdown at 40 7 * * * is already scheduled
      ------------------------------------------------------------------------------
      

      However this task didn’t run. here’s the full client log:
      0_1467899347434_fog.log

      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
      • Wayne WorkmanW
        Wayne Workman
        last edited by

        Also just noticed that the server version isn’t reporting in the log file. It used to work on this client version - so that must be a server side issue @Tom-Elliott.

        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
        • J
          Joe Schmitt Senior Developer
          last edited by

          Issue confirmed and patched in nightlies. Fix will be available in v0.11.3 release.

          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.

          1 Reply Last reply Reply Quote 2
          • Tom ElliottT
            Tom Elliott
            last edited by

            0.11.3 has been released. Of course please keep us posted if this is still happening, or not.

            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

            1 Reply Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman
              last edited by

              This issue is fixed.

              Although I should explain some of the things I learned when messing with it this morning.

              If your time is off on the client, scheduled tasks won’t perform as expected. My time was off due to incorrect timezone. I fixed it by creating a batch script with this in it, and deployed it via snapins to the building:
              %windir%\system32\tzutil /s "Central Standard Time"

              After that ran, I noticed the system time was corrected - however the timestamps in the FOG Client (0.11.3) were still incorrect. It was still counting up using the old time. So I rebooted my computer to fix this, and then when it came back up the FOG Client started writing correct timestamps.

              I tried a scheduled shutdown, and it appears to work.

              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 1
              • Wayne WorkmanW
                Wayne Workman
                last edited by Wayne Workman

                @Senior-Developers I think this may not be fixed yet entirely.

                I’m not sure what the problem is at this point - but I think it’s server side.

                I set a power management setting to shut down all computers at 10 pm. It looks like this:
                0_1468436607962_power management.png

                I’ve noticed computers are not shutting down, it’s been two days. time is correct on all computers now, and server time is correct.

                I did some digging in the powerManagement table, in the fog db. A lot of strange stuff in there, I truncated the table to start fresh.

                I also updated to 8540, and then tried re-doing the power management settings for all hosts.

                When I select all rows from powerManagement, this is what I’m seeing and it looks a whole lot better now:

                MariaDB [fog]> select * from powerManagement;
                +------+----------+-------+--------+-------+---------+-------+----------+------------+
                | pmID | pmHostID | pmMin | pmHour | pmDom | pmMonth | pmDow | pmAction | pmOndemand |
                +------+----------+-------+--------+-------+---------+-------+----------+------------+
                |    1 |      829 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                |    2 |      828 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                |    3 |      830 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                |    4 |      377 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                |    5 |      379 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                
                .... all the same.
                
                |  423 |      749 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                |  424 |      838 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                |  425 |      750 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                |  426 |      855 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                |  427 |      854 | 0     | 22     | *     | *       | *     | shutdown | 0          |
                +------+----------+-------+--------+-------+---------+-------+----------+------------+
                427 rows in set (0.00 sec)
                

                However, on my desktop the FOG Client (0.11.3) isn’t getting the settings for some reason:

                ------------------------------------------------------------------------------
                --------------------------------PowerManagement-------------------------------
                ------------------------------------------------------------------------------
                 7/13/2016 2:05 PM Client-Info Client Version: 0.11.3
                 7/13/2016 2:05 PM Client-Info Client OS:      Windows
                 7/13/2016 2:05 PM Client-Info Server Version: 8540
                 7/13/2016 2:05 PM Middleware::Response Success
                 7/13/2016 2:05 PM PowerManagement Calculating tasks to unschedule
                 7/13/2016 2:05 PM PowerManagement Calculating tasks to schedule
                ------------------------------------------------------------------------------
                

                Here is the entire log file: 0_1468436777369_fog.log

                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
                • Tom ElliottT
                  Tom Elliott
                  last edited by

                  @Joe-Schmitt and I tested this today and we did not see any issues. I half wonder, (doubt it should matter much) if updating the minute field to 1 helps?

                  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

                  Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman @Tom Elliott
                    last edited by

                    @Tom-Elliott I can try it.

                    Tomorrow I’m going to tell the building to reboot first thing in the morning, too - after I truncate the powerManagement table agian.

                    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
                    • Tom ElliottT
                      Tom Elliott
                      last edited by

                      Found issue and fixed it. This was indeed happening due to the minute field being set to 0. The same would’ve also happened if the hour field was set to 0. Bad logic on my part (trying to use 0 as identifier returns as false in php).

                      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

                      1 Reply Last reply Reply Quote 1
                      • Wayne WorkmanW
                        Wayne Workman
                        last edited by

                        Confirmed fixed, the client is now showing in the logs the scheduled power task.

                        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
                        • 1 / 1
                        • First post
                          Last post

                        158

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project