AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  Enabling verbose logging on a job that passes commands to Windows box?

    Posted Jun 10, 2019 11:41 AM
    Hi All,

    I have a job that passes a basic command to a Windows server- to open IE and go to a custom generated URL from the job script. These URLs work manually but the job is not working- even though it ends OK in statistics.

    My question: how can I turn up some logging or something to confirm that these commands are successfully making it to the server?


  • 2.  RE: Enabling verbose logging on a job that passes commands to Windows box?

    Posted Jun 27, 2019 12:13 PM
    ​Hi,

    Is this about Automaton Engine?

    There used to be a command "show generated job" in Automic that would show the generated commands, but it has been either removed or obfuscated in 12.x.; depending on the object type it may be triggered by a non-obvious context menu entry. I forgot which one, it's quite some time ago I filed a case for that.

    However, maybe this works: Run your job, possibly put a delay into it as well so it artificially runs a few seconds (a sleep statement or "ping -c 10 localhost" or something). Start your job and then look into the agent's "tmp" directory. There should be a .TXT file, name consisting of only random letters (no numbers) with the matching timestamp which should contain the generated commands, and can be opened with notepad.

    The file will also contain additional header and footer lines that make calls to the agent executable.

    Hth,


  • 3.  RE: Enabling verbose logging on a job that passes commands to Windows box?

    Posted Jun 28, 2019 04:07 AM
    Hi Carsten,
    what exactly did you mean? in 12 is the context menu "open monitor" in the executions of each job and there you can see the generated jcl.

    ------------------------------
    Thx & rgds
    Christian
    ------------------------------



  • 4.  RE: Enabling verbose logging on a job that passes commands to Windows box?

    Posted Jun 28, 2019 05:53 AM
    ​Hi Christian,

    Thanks, "open monitor" is exactly what I meant by "non-obvious context menu entry". Myself and others would not have expected to find "show generated job" under the "open monitor" label, which in other context opens a monitor, e.g. a dynamic display. Last night I recalled it was to be found somewhere, but could not recall exactly where that was.

    So, thanks for pointing out the menu entry.


  • 5.  RE: Enabling verbose logging on a job that passes commands to Windows box?

    Posted Jun 28, 2019 09:15 AM

    Hi,

    Thanks for your response. Essentially I've got a job that passes 2 basic commands into a Windows box. The job runs successfully in UC4 but the actual results of the job indicate the commands may not be run. The reporting in UC4 (found via Statistics) don't actually indicate any of these commands being fired, exit codes, or anything similar. The job was running fine until a few months ago, but I ran a diff on the script from back then and the current one, and there are no differences.




  • 6.  RE: Enabling verbose logging on a job that passes commands to Windows box?
    Best Answer

    Posted Jun 28, 2019 09:46 AM
    ​Hi,

    A few ideas (even though some qualify as "poor man's debugging" :)

    Maybe try putting something like

    echo "hello world" > c:\windows\temp\test.txt

    on top of the process tab and see if that file gets created when you run the job? That way, you know if your agent is executing commands at all. You could also clone the job and put just that one line in there, to make sure there are no syntax errors in the other commands that cause problems.

    You can also look at the log files in the agent's temp directory to find out if the agent is executing your job on the remote machine. You could also enable tracing in the right-click agent properties (administration tab), the trace files may contain additional hints to what may be wrong.

    By the way, Windows jobs in Automic may always report ENDED_OK unless you use the boiler plate code that evaluates %ERRORLEVEL%, as provided by Automic with their original job template. This is a common pitfall.

    Hth