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

    [SCRIPT] FOG tools

    Scheduled Pinned Locked Moved
    Tutorials
    3
    11
    5.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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by

      That is super sweet.

      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

        Now that we know we can change compression settings post-upload,

        Would it make sense to always upload with compression set at 0 and then compress server-side afterwards?

        Then, we wouldn’t need FTP client side to move images from /images/dev to /images because after compression completes, the image could be moved?

        Maybe even a progress bar for the compression progress could be displayed under “Tasks” ?

        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/

        ch3iC 1 Reply Last reply Reply Quote 1
        • ch3iC
          ch3i Moderator @Wayne Workman
          last edited by

          @Wayne-Workman said:

          Then, we wouldn’t need FTP client side to move images from /images/dev to /images because after compression completes, the image could be moved?

          Depends the server performance, if you have multiple uploads you will have a high cpu utilization.

          1 Reply Last reply Reply Quote 0
          • ch3iC
            ch3i Moderator
            last edited by

            Updated :

            • Correct rights problem on new imgs
            • Adding progression bar using PV

            With progression :

            #########################################################
            #                 FOG Images tools                      #
            #########################################################
            
            Changing compression of MASTER_WB from 0 to 5 :
            
                                     
            Backup img...Done
             
            Compress new img...In progress
            24,2MO 0:00:00 [  78MB/s] [=======================================================>] 100%            
            73,3GO 0:18:12 [68,7MB/s] [=======================================================>] 100%            
            37,5GO 0:09:58 [64,1MB/s] [=======================================================>] 100%            
             5,1kO 0:00:00 [ 394kB/s] [=======================================================>] 100%            
             142MO 0:00:00 [ 163MB/s] [=======================================================>] 100%            
             
            Compress new img...Done
                                         
            Remove backups...Done
                                          
            Update database...Done
            Exiting...
            

            The size isn’t the compressed size, but size before.

            1 Reply Last reply Reply Quote 0
            • Joseph HalesJ
              Joseph Hales Testers
              last edited by

              I would think multiple uploads would be an edge case I would love to have this as a feature especially if it could compress a temp copy so you could deploy immediately.

              RTFM

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

                @Joseph-Hales said:

                I would think multiple uploads would be an edge case I would love to have this as a feature especially if it could compress a temp copy so you could deploy immediately.

                Well, I suppose the uncompressed copy could serve as the “temp” copy.

                And, I suppose FTP could go ahead and just move that over from /dev to /images like normal

                and in the background, the server could compress the /images image to /dev and when it’s done (and waiting for active tasks for that image to complete), it could replace it with the compressed copy?

                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 2
                • Joseph HalesJ
                  Joseph Hales Testers
                  last edited by

                  That would be perfect.

                  RTFM

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

                    I think this is easily accomplished.

                    Using Ch3i’s script for compression, and making that automated, and scheduling a Cron task on the server to run that script every hour or so should do the trick.

                    The script will need a default compression set, and it’ll need to check the DB for any images that aren’t set to that default (say, compression 1). Then, it would check to see if that image exists in it’s storage node, if so, recompress it to /node/dev , and then check the DB if there are active tasks associated with that image… and just wait till they get done, then replace the old image with the new.

                    I think I can do this, I’ll try tonight or tomorrow night.

                    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/

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

                      @Wayne-Workman said:

                      I think I can do this, I’ll try tonight or tomorrow night.

                      Didn’t get to this tonight… passed out straight away after work. It was a long and tough day.
                      And my laptop is acting up… I replaced the fan in it yesterday and the fan was literally the very last component I could take out of the plastic frame… I think I’m going to have to open it up again and re-do the thermal compound, might have used too much. It’s the worst designed laptop I’ve ever seen… It’s like they wanted to make cleaning/replacing the fan & radiator as difficult as possible.

                      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

                        Bumping this thread.

                        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

                        174

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project