Michael_Lowry

Automation Engine tracing

Discussion created by Michael_Lowry on Jan 29, 2018
Latest reply on Feb 1, 2018 by Michael_Lowry
Frustrated by the inadequate tools available for this, I created a little workflow (along with related objects) that facilitates collection of rolling traces in the Automation Engine.
2rc8yd0cs8r7.png

The workflow has two main modes of operation:
  1. Disable tracing: Run the workflow without changing any of the prompt set values (just leave them set to their defaults), and it will disable tracing completely.
  2. Enable tracing: Select something other than0=Trace disabledfrom AE Processesmenu, and select something other than0=no outputfrom one or more of the Trace optionsmenus, and the workflow will activate tracing according to the options you selected.
The script uses :SET_UC_SETTING to enable tracing initially, but uses CHANGE_LOGGING to begin writing new files. You can specify an interval between writing subsequent files, a maximum duration, and a maximum number of times to begin writing new files. The workflow disables tracing when the maximum duration has been reached, or the maximum number of files has been written, whichever comes first.

The workflow also includes a couple of extra safety mechanisms:
  • It checks whether the target file system has enough free space; if the amount of free space goes below this limit (default: 15%), tracing is disabled.
  • It turns off tracing if the trace options have been changed, either manually or by another task. So if you run another instance of the workflow todisable tracing (or simply disable tracing manually), any currently running instances of the workflow will detect the change and quit (upon completion of their currently-running:WAITinterval — see below).
These checks are performed only at the period specified by the trace interval, so it’s prudent to keep the interval pretty small. In other words, the interval should be sufficiently small that the AE does not fill up your file system with a single round of trace files. These checks are performed every two minutes.

To use the workflow in your environment, you will need to adjust a few things:
1. Set the queue of the workflow and script to a queue that exists in your system.
2. Adjust these variables in the process tab of the workflow:
:PSET &Trace_Filesystem# = "/var"
:PSET &AE_Agent_or_AgentGroup# = "AE_SERVERS"
:PSET &AE_Agent_Login# = "UC4.LOGIN"
:PSET &Queue# = "UC4"
:PSET &MinFilesystemFreePercent# = "15"
Update 2018.01.31 16:45 CET: I updated the workflow so that it performs the periodic checks at two minute intervals, regardless how often new log/trace files are written. To change the check interval, change this line in the script:
:SET &CheckInterval# = 120
I recommend keeping this interval between 30 seconds and 5 minutes.

This workflow builds on some things I have shared here before:
Enjoy!

Attachments

Outcomes