Automic Workload Automation

 View Only
  • 1.  Improved way of running the AE DB Utility programs

    Posted Feb 07, 2018 05:45 AM
    A few months ago, Carsten_Schmitz_7883 discovered a way to force the AE DB Utility programs to write log and trace output to distinct files for each run. Here is an example ucybdbld.ini file for the AE DB Load program ucybdbld:
    [GLOBAL]
    language  = (E)
    logging   = /dev/stdout
    logcount  = 10
    helplib   = uc.msl
    helpcache = ALL
    input     = ../db/

    [TRACE]
    file     = /dev/stderr
    trccount = 10
    database = 1
    ; 0=no
    ; 1=SQL
    ; 2=OPC
    ; 3=BindParam
    ; 4=data fields
    ...
    So now I can run the program as follows:
    ./ucybdbld -Iucybdbld.ini -B -EREPLACE -FOT -C0001 -X/tmp/TC1.txt 1>ucybdbld_$$_log.txt 2>ucybdbld_$$_trc.txt
    Log output goes to https://en.wikipedia.org/wiki/Standard_streamsstandard output (1) and trace output goes to standard error (2). Each stream is in turn redirected to a separate file. Inclusion of the process ID ($$) in the output file names means that a unique log and trace file will be written for each run of the program.

    I also created several copies of the INI file — one for each trace level:
    • ucybdbld-trace0.ini
    • ucybdbld-trace1.ini
    • ucybdbld-trace2.ini
    • ucybdbld-trace3.ini
    • ucybdbld-trace4.ini
    This facilitates quick collection of traces. I just have to switch which INI file I’m using.

    A similar approach can be used for ucybdbun and ucybchng.


  • 2.  Improved way of running the AE DB Utility programs

    Posted Feb 07, 2018 06:56 AM
    One thing to mention is, that if you implement it and don't tell your colleague that you did. He might end up with no logs at all.

    Not saying this did happend to me or anybody  :-)


  • 3.  Improved way of running the AE DB Utility programs

    Posted Feb 07, 2018 07:10 AM
    Not saying this did happend to me or anybody  :-)
    Meh. Having logs is overrated :)


  • 4.  Improved way of running the AE DB Utility programs

    Posted Feb 07, 2018 07:13 AM
    speaking from supports perspective: its not ;)


  • 5.  Improved way of running the AE DB Utility programs

    Posted Feb 07, 2018 07:47 AM
    Well, I left the original INI files in place and created new ones. These programs are used as part of an [DEAD LINK https://community.automic.com/discussion/comment/31392/#Comment_31392]automated batch deployment system, so changing the existing INI files is not an option. :)

    With 5 trace levels, 5 AE systems, and 3 AE DB programs (two of which are system-specific), I actually created a total of 55 new INI files.

                                                                                       

    01234
    EXP2ucybdbunEXP2-trace0.ini
        ucybdbldEXP2-trace0.ini
    ucybdbunEXP2-trace1.ini
        ucybdbldEXP2-trace1.ini
    ucybdbunEXP2-trace2.ini
        ucybdbldEXP2-trace2.ini
    ucybdbunEXP2-trace3.ini
        ucybdbldEXP2-trace3.ini
    ucybdbunEXP2-trace4.ini
        ucybdbldEXP2-trace4.ini
    EXPucybdbunEXP-trace0.ini
        ucybdbldEXP-trace0.ini
    ucybdbunEXP-trace1.ini
        ucybdbldEXP-trace1.ini
    ucybdbunEXP-trace2.ini
        ucybdbldEXP-trace2.ini
    ucybdbunEXP-trace3.ini
        ucybdbldEXP-trace3.ini
    ucybdbunEXP-trace4.ini
        ucybdbldEXP-trace4.ini
    DEVucybdbunDEV-trace0.ini
        ucybdbldDEV-trace0.ini
    ucybdbunDEV-trace1.ini
        ucybdbldDEV-trace1.ini
    ucybdbunDEV-trace2.ini
        ucybdbldDEV-trace2.ini
    ucybdbunDEV-trace3.ini
        ucybdbldDEV-trace3.ini
    ucybdbunDEV-trace4.ini
        ucybdbldDEV-trace4.ini
    ITEucybdbunITE-trace0.ini
        ucybdbldITE-trace0.ini
    ucybdbunITE-trace1.ini
        ucybdbldITE-trace1.ini
    ucybdbunITE-trace2.ini
        ucybdbldITE-trace2.ini
    ucybdbunITE-trace3.ini
        ucybdbldITE-trace3.ini
    ucybdbunITE-trace4.ini
        ucybdbldITE-trace4.ini
    PRODucybdbunPROD-trace0.ini
        ucybdbldPROD-trace0.ini
    ucybdbunPROD-trace1.ini
        ucybdbldPROD-trace1.ini
    ucybdbunPROD-trace2.ini
        ucybdbldPROD-trace2.ini
    ucybdbunPROD-trace3.ini
        ucybdbldPROD-trace3.ini
    ucybdbunPROD-trace4.ini
        ucybdbldPROD-trace4.ini
    Commonucybchng-trace0.iniucybchng-trace1.iniucybchng-trace2.iniucybchng-trace3.iniucybchng-trace4.ini

    I will update our deployment script so that by default it uses the new files with trace level 0. I already use a variable to choose the INI file at run time based on system name; I’ll just add another variable for trace level so that it can be switched on easily to debug problems.