Tracing levels
Documentum job scheduler
Xense Session Manager
Job scheduler
Job selection query
Tracing job
Documentum job scheduler

By default dm_agent_exex will output log information to $DOCUMENTUM/dba/log/<docbaseid>/agentexec/agentexec.txt (%DOCUMENTUM%\dba\log\<docbaseid>\agentexec\agentexec.log on Windows). We can turn on agent exec tracing which will output alot more information in the log file and see exactly how dm_agent_exec goes about its job.

You can turn on agent exec tracing using Documentum Administrator or IAPI - the steps given here use IAPI:

1. Update the method_verb attribute to turn on tracing:

retrieve,c,dm_method where object_name = 'agent_exec_method'
./dm_agent_exec (Unix) or .\dm_agent_exec.exe (Windows)
./dm_agent_exec -trace_level 1 (Unix) or .\dm_agent_exec.exe -trace_level 1 (Windows)

2. Now kill the exsiting agent exec - on Unix use the 'kill' command, on Windows use the Task Manager processes tab. After a minute or so dm_agent_exec should restart.

The trace file should look something like the following:

1 Wed Jan 05 12:19:15 2005 [AGENTEXEC 1552] do_exec: execquery,s0,F,SELECT ALL r_object_id, a_next_invocation FROM dm_job WHERE ( (run_now = 1) OR ((is_inactive = 0) AND ( ( a_next_invocation <= DATE('now') AND a_next_invocation IS NOT NULLDATE ) OR ( a_next_continuation <= DATE('now') AND a_next_continuation IS NOT NULLDATE ) ) AND ((expiration_date > DATE('now')) OR (expiration_date IS NULLDATE)) AND ((max_iterations = 0) OR (a_iterations < max_iterations))) ) AND (i_is_reference = 0 OR i_is_reference is NULL) AND (i_is_replica = 0 OR i_is_replica is NULL) ORDER BY a_next_invocation, r_object_id

2 Wed Jan 05 12:19:15 2005 [AGENTEXEC 1552] do_get: getlastcoll,s0

3 Wed Jan 05 12:19:15 2005 [AGENTEXEC 1552] do_next: next,s0,q0

4 Wed Jan 05 12:19:15 2005 [AGENTEXEC 1552] do_exec: close,s0,q0

5 Wed Jan 05 12:19:15 2005 [AGENTEXEC 1552] do_exec: begintran,s0

6 Wed Jan 05 12:19:15 2005 [AGENTEXEC 1552] do_exec: commit,s0

7 Wed Jan 05 12:19:15 2005 [AGENTEXEC 1552] do_sleep: 60

This is the typical output that you will get when the job scheduler does not find any jobs to execute. I have added red line numbers at the beginning of each line to make it easier to refer to in the text. Line 1 shows the query that the job scheduler executes to locate runnable jobs. Lines 2 is the api call to retrieve the query collection and line 3 shows the 'next' api call used to iterate throught the query result set. Since line 4 shows the close api call being made we can infer that there were no jobs returned by the query. Line 5 and 6 just show a start transaction/commit transaction command pair which appears to have no relevance to the operation of dm_agent_exec. Line 7 then shows that the process 'sleeps' for 60 seconds. The process then wakes and repeats the process.