6 Replies Latest reply on Jul 9, 2021 6:40 AM by Bibek Sahoo

    PWX detail.log size control

    Lakhwant Singh Seasoned Veteran

      We have just started a POC where PWX will be used.

      We did some testing on PWX and it works OK but I had a few concerns:

      1. How to control Condense file size. A file exceeded 25 GB during testing.

      We overcame that by limiting it to 10000 records per file by defining it in pwxccl.cfg.

       

      2. How to limit the size of detail.log

      I am still searching for a solution to make sure detail log doesnt exceed a pre-defined size and if it does then a new log should be started and the older one should be saved by adding timestamp etc. Can this be done through some setting in the listener or logger config files?

       

      3. I created some wrapper shell scripts for developers who can run listener and logger from their application directory. These wrapper scripts call pwxsettask.sh script using nohup. This way nohup log size also keeps on increasing. Is there any way to overcome that too. Would it be possible to call this script like "${PWX_HOME}/pwxsettask.sh &" instead of "nohup sh $PWX_HOME/pwxsettask.sh &"

      I am pretty new to PWX thing and still reading through the PDFs but it would be great if someone can help with above concerns.

       

      Thanks

      Lakhwant

        • 1. Re: PWX detail.log size control
          Leroy Gharis New Member

          At the end of a nohup command add "/dev/null &" instead of just "&".  This will eliminate the creation of the nohup.out file.

          • 2. Re: PWX detail.log size control
            Nico Heinze Guru

            As to Q2, size of detail.log file:

            The solution implemented by most customers I've seen is to regularly rename the existing file and create a new detail.log . At least under Unix/Linux/Windows this works fine because the file is not kept open all the time but only whenever new messages shall be saved there.

            I've seen cron jobs (running a short shell script) and batch files (simply renaming the existing file and creating a new one) to perform this task on a regular basis.

             

            Regards,

            Nico

            • 3. Re: PWX detail.log size control
              Nico Heinze Guru

              BTW you better post such questions on the PowerExchange forum (not PowerExchange Adapters!), there you will find the right experts.

               

              Regards,

              Nico

              • 4. Re: PWX detail.log size control
                dan.smith@informatica.com Guru

                Moving thread to PowerExchange community.

                • 5. Re: PWX detail.log size control
                  dan.smith@informatica.com Guru

                  In addition to Leroy and Nico's responses, you might want to consider using Alternative Logging.

                   

                  When you add a TRACING statement to DBMOVER.CFG, anything run using that DBMOVER.CFG will use Alternative Logging.

                  This routes the messaging from each component to its own message log file, and provides options to control the size of such files, and the number of files to keep before "wrapping" and overwriting the previous message log files.

                  It can also make troubleshooting easier, as each component's messages are isolated.

                  With Alternative Logging, the only things that go to detail.log is some of the initialization messages.

                  • 6. Re: PWX detail.log size control
                    Bibek Sahoo Active Member

                    Hi Lakhwant,

                     

                     

                    1. For Condense file size below two parameters you can change:

                    FILE_SWITCH_CRIT=Record(R)/Minute(M)

                    FILE_SWITCH_VAL=**

                     

                     

                    2. Please find some examples showing the setup.

                    You can add below statements in dbmover file whcih you use to start listener and logger and create the appropiate files.

                     

                     

                    LOGPATH=ABC\PowerExchange**\BCD

                    TRACING=(PFX=Altlogs,FILENUM=10,FLUSH=10,SIZE=10)

                     

                     

                    and then recycle Listener and logger.

                    Listener log will be created at location ABC\PowerExchange**\BCD\Altlogs\DTLLST*

                    Logger log will be created at location ABC\PowerExchange**\BCD\Altlogs\Pwxccl*

                     

                     

                    and also you can control the size of the logs using TRACING parameter settings SIZE.

                     

                     

                    3. Script, you can test on linux machine, where you are running, the requirement is to run the process from Power Exchange home directory. If you use LOGPATH and Tracing then logs should be created as above.

                     

                     

                    You can read more about these statements in Power Exchange Reference Manual.

                     

                     

                    Regards,

                    Bibek