Stack map
Read the real execution tree of a process of the stack: the processes it started, their state, waiting time, duration, attempts, errors and logs, the critical path and the slowest scripts. stack trees lists the last executions to pick one. Typical uses: find why a nightly chain was slow, see which branch failed, follow a running execution.
stack tree <pid>
Description
The execution tree that contains a process (its first ancestor still in the stack and all the processes started from there): {pid, nodename, root, root_script, parent_missing (the parent of the root when it was purged), now, time_precision, processes, states: {wait, running, closed, error}, errors, depth, start, wall_ms, finished, critical_path, critical_ms, slowest_scripts: [{script, processes, total_ms, max_ms, errors}], logs, truncated, timed_out, nodes: [{pid, parent_id, depth, script, state, login, nodename, flow, flow_pos, flow_step, created, planned, start, end, wait_ms, duration_ms, running_so_far, offset_ms, start_offset_ms, attempts, max_attempts, error, children, logs (number of log lines), params, critical}]} in tree order
The execution tree that contains a process (its first ancestor still in the stack and all the processes started from there): {pid, nodename, root, root_script, parent_missing (the parent of the root when it was purged), now, time_precision, processes, states: {wait, running, closed, error}, errors, depth, start, wall_ms, finished, critical_path, critical_ms, slowest_scripts: [{script, processes, total_ms, max_ms, errors}], logs, truncated, timed_out, nodes: [{pid, parent_id, depth, script, state, login, nodename, flow, flow_pos, flow_step, created, planned, start, end, wait_ms, duration_ms, running_so_far, offset_ms, start_offset_ms, attempts, max_attempts, error, children, logs (number of log lines), params, critical}]} in tree order
Parameters
pid: A process id of the stack, or "nodename" pid as in the stack grids of the editor - String - required
pid: A process id of the stack, or "nodename" pid as in the stack grids of the editor - String - required
admin
stack tree "2g"
mentdb
{"pid": "2g", "nodename": "DEV_N1", "root": "2g", "root_script": "zz_scgraph_test.root.exe", "parent_missing": null, "now": "2026-11-12 09:23:22.101", "time_precision": "ms", "processes": 6, "states": {"wait": 0, "running": 0, "closed": 5, "error": 1}, "errors": 1, "depth": 2, "start": "2026-11-12 09:04:30.152", "wall_ms": 120298, "finished": true, "critical_path": ["2g", "2i", "2m"], "critical_ms": 120298, "slowest_scripts": [{"script": "zz_scgraph_test.c.exe", "processes": 2, "total_ms": 855, "max_ms": 428, "errors": 0}, {"script": "zz_scgraph_test.a.exe", "processes": 1, "total_ms": 648, "max_ms": 648, "errors": 0}, {"script": "zz_scgraph_test.root.exe", "processes": 1, "total_ms": 344, "max_ms": 344, "errors": 0}, {"script": "zz_scgraph_test.b.exe", "processes": 1, "total_ms": 258, "max_ms": 258, "errors": 0}, {"script": "zz_scgraph_test.fail.exe", "processes": 1, "total_ms": 126, "max_ms": 126, "errors": 1}], "logs": 17, "truncated": false, "timed_out": false, "nodes": [{"pid": "2g", "parent_id": null, "depth": 0, "script": "zz_scgraph_test.root.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:04:30.152", "planned": "2026-11-12 09:04:30", "start": "2026-11-12 09:05:00.031", "end": "2026-11-12 09:05:00.375", "wait_ms": 29879, "duration_ms": 344, "running_so_far": false, "offset_ms": 0, "start_offset_ms": 29879, "attempts": 1, "max_attempts": 1, "error": null, "children": 2, "logs": 4, "params": {"[run]": "r2"}, "critical": true}, {"pid": "2i", "parent_id": "2g", "depth": 1, "script": "zz_scgraph_test.a.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:00.057", "planned": "2026-11-12 09:05:00", "start": "2026-11-12 09:05:30.029", "end": "2026-11-12 09:05:30.677", "wait_ms": 29972, "duration_ms": 648, "running_so_far": false, "offset_ms": 29905, "start_offset_ms": 59877, "attempts": 1, "max_attempts": 1, "error": null, "children": 1, "logs": 3, "params": {"[n]": "1"}, "critical": true}, {"pid": "2m", "parent_id": "2i", "depth": 2, "script": "zz_scgraph_test.c.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:30.675", "planned": "2026-11-12 09:05:30", "start": "2026-11-12 09:06:30.022", "end": "2026-11-12 09:06:30.450", "wait_ms": 59347, "duration_ms": 428, "running_so_far": false, "offset_ms": 60523, "start_offset_ms": 119870, "attempts": 1, "max_attempts": 1, "error": null, "children": 0, "logs": 3, "params": {}, "critical": true}, {"pid": "2j", "parent_id": "2g", "depth": 1, "script": "zz_scgraph_test.b.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:00.065", "planned": "2026-11-12 09:05:00", "start": "2026-11-12 09:05:30.030", "end": "2026-11-12 09:05:30.288", "wait_ms": 29965, "duration_ms": 258, "running_so_far": false, "offset_ms": 29913, "start_offset_ms": 59878, "attempts": 1, "max_attempts": 1, "error": null, "children": 2, "logs": 2, "params": {}, "critical": false}, {"pid": "2k", "parent_id": "2j", "depth": 2, "script": "zz_scgraph_test.fail.exe", "state": "error", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:30.274", "planned": "2026-11-12 09:05:30", "start": "2026-11-12 09:06:00.029", "end": "2026-11-12 09:06:00.155", "wait_ms": 29755, "duration_ms": 126, "running_so_far": false, "offset_ms": 60122, "start_offset_ms": 89877, "attempts": 1, "max_attempts": 1, "error": "line 1 >>> zz_scgraph_test.fail.exe \ line 3 >>> exception 1; \"\\\\\"zz_scgraph_test failure on purpose\\\\\";\" ; 1: zz_scgraph_test failure on purpose", "children": 0, "logs": 2, "params": {}, "critical": false}, {"pid": "2l", "parent_id": "2j", "depth": 2, "script": "zz_scgraph_test.c.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:30.287", "planned": "2026-11-12 09:05:30", "start": "2026-11-12 09:06:00.030", "end": "2026-11-12 09:06:00.457", "wait_ms": 29743, "duration_ms": 427, "running_so_far": false, "offset_ms": 60135, "start_offset_ms": 89878, "attempts": 1, "max_attempts": 1, "error": null, "children": 0, "logs": 3, "params": {}, "critical": false}]}
A pid that is not a process id
admin
stack tree "12; DROP TABLE logs"
mentdb
ERROR: Sorry, an error appears (the parameter 'pid' must be a process id (letters and digits), or "nodename" pid as in the stack grids).
stack tree <pid> <json_params>
Description
The execution tree with parameters: logs (0: the number of log lines of each process only; 1 to 200: also the first log lines of each process, 5000 lines at most in all), logs_of (only the log lines of this pid), params (true: the parameters given to stack), max_nodes (5000, 1 to 20000), error_max (300 characters of the error message, 20 to 5000), node (the node of the closed and error processes), timeout_ms (20000, 100 to 60000)
The execution tree with parameters: logs (0: the number of log lines of each process only; 1 to 200: also the first log lines of each process, 5000 lines at most in all), logs_of (only the log lines of this pid), params (true: the parameters given to stack), max_nodes (5000, 1 to 20000), error_max (300 characters of the error message, 20 to 5000), node (the node of the closed and error processes), timeout_ms (20000, 100 to 60000)
Parameters
pid: A process id of the stack, or "nodename" pid as in the stack grids of the editor - String - required
json_params: The parameters - String - required
pid: A process id of the stack, or "nodename" pid as in the stack grids of the editor - String - required
json_params: The parameters - String - required
admin
stack tree "\"DEV_N1\" 2k" "{\"logs\": 3, \"logs_of\": \"2k\", \"params\": false}"
mentdb
{"pid": "2k", "nodename": "DEV_N1", "root": "2g", "root_script": "zz_scgraph_test.root.exe", "parent_missing": null, "now": "2026-11-12 09:23:22.313", "time_precision": "ms", "processes": 6, "states": {"wait": 0, "running": 0, "closed": 5, "error": 1}, "errors": 1, "depth": 2, "start": "2026-11-12 09:04:30.152", "wall_ms": 120298, "finished": true, "critical_path": ["2g", "2i", "2m"], "critical_ms": 120298, "slowest_scripts": [{"script": "zz_scgraph_test.c.exe", "processes": 2, "total_ms": 855, "max_ms": 428, "errors": 0}, {"script": "zz_scgraph_test.a.exe", "processes": 1, "total_ms": 648, "max_ms": 648, "errors": 0}, {"script": "zz_scgraph_test.root.exe", "processes": 1, "total_ms": 344, "max_ms": 344, "errors": 0}, {"script": "zz_scgraph_test.b.exe", "processes": 1, "total_ms": 258, "max_ms": 258, "errors": 0}, {"script": "zz_scgraph_test.fail.exe", "processes": 1, "total_ms": 126, "max_ms": 126, "errors": 1}], "logs": 17, "truncated": false, "timed_out": false, "nodes": [{"pid": "2g", "parent_id": null, "depth": 0, "script": "zz_scgraph_test.root.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:04:30.152", "planned": "2026-11-12 09:04:30", "start": "2026-11-12 09:05:00.031", "end": "2026-11-12 09:05:00.375", "wait_ms": 29879, "duration_ms": 344, "running_so_far": false, "offset_ms": 0, "start_offset_ms": 29879, "attempts": 1, "max_attempts": 1, "error": null, "children": 2, "logs": 4, "log_lines": [], "params": {"[run]": "r2"}, "critical": true}, {"pid": "2i", "parent_id": "2g", "depth": 1, "script": "zz_scgraph_test.a.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:00.057", "planned": "2026-11-12 09:05:00", "start": "2026-11-12 09:05:30.029", "end": "2026-11-12 09:05:30.677", "wait_ms": 29972, "duration_ms": 648, "running_so_far": false, "offset_ms": 29905, "start_offset_ms": 59877, "attempts": 1, "max_attempts": 1, "error": null, "children": 1, "logs": 3, "log_lines": [], "params": {"[n]": "1"}, "critical": true}, {"pid": "2m", "parent_id": "2i", "depth": 2, "script": "zz_scgraph_test.c.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:30.675", "planned": "2026-11-12 09:05:30", "start": "2026-11-12 09:06:30.022", "end": "2026-11-12 09:06:30.450", "wait_ms": 59347, "duration_ms": 428, "running_so_far": false, "offset_ms": 60523, "start_offset_ms": 119870, "attempts": 1, "max_attempts": 1, "error": null, "children": 0, "logs": 3, "log_lines": [], "params": {}, "critical": true}, {"pid": "2j", "parent_id": "2g", "depth": 1, "script": "zz_scgraph_test.b.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:00.065", "planned": "2026-11-12 09:05:00", "start": "2026-11-12 09:05:30.030", "end": "2026-11-12 09:05:30.288", "wait_ms": 29965, "duration_ms": 258, "running_so_far": false, "offset_ms": 29913, "start_offset_ms": 59878, "attempts": 1, "max_attempts": 1, "error": null, "children": 2, "logs": 2, "log_lines": [], "params": {}, "critical": false}, {"pid": "2k", "parent_id": "2j", "depth": 2, "script": "zz_scgraph_test.fail.exe", "state": "error", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:30.274", "planned": "2026-11-12 09:05:30", "start": "2026-11-12 09:06:00.029", "end": "2026-11-12 09:06:00.155", "wait_ms": 29755, "duration_ms": 126, "running_so_far": false, "offset_ms": 60122, "start_offset_ms": 89877, "attempts": 1, "max_attempts": 1, "error": "line 1 >>> zz_scgraph_test.fail.exe \ line 3 >>> exception 1; \"\\\\\"zz_scgraph_test failure on purpose\\\\\";\" ; 1: zz_scgraph_test failure on purpose", "children": 0, "logs": 2, "log_lines": [{"id": "176", "time": "2026-11-12 09:06:00.047", "status": "OK", "msg": "[---- Begin script ----]", "key": null, "value": null}, {"id": "178", "time": "2026-11-12 09:06:00.153", "status": "KO", "msg": "\ line 3 >>> exception 1; \"\\\\\"zz_scgraph_test failure on purpose\\\\\";\" ; 1: zz_scgraph_test failure on purpose", "key": null, "value": null}], "params": {}, "critical": false}, {"pid": "2l", "parent_id": "2j", "depth": 2, "script": "zz_scgraph_test.c.exe", "state": "closed", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:05:30.287", "planned": "2026-11-12 09:05:30", "start": "2026-11-12 09:06:00.030", "end": "2026-11-12 09:06:00.457", "wait_ms": 29743, "duration_ms": 427, "running_so_far": false, "offset_ms": 60135, "start_offset_ms": 89878, "attempts": 1, "max_attempts": 1, "error": null, "children": 0, "logs": 3, "log_lines": [], "params": {}, "critical": false}]}
Fixed result of a real run in the stack of a development server on 2026-11-12: a tree while it runs: the root is running (duration so far), its child waits for its date, 10 minutes later
admin
stack tree "2p" "{\"logs\": 2}"
mentdb
{"pid": "2p", "nodename": "DEV_N1", "root": "2p", "root_script": "zz_scgraph_test.slow.exe", "parent_missing": null, "now": "2026-11-12 09:21:31.598", "time_precision": "ms", "processes": 2, "states": {"wait": 1, "running": 1, "closed": 0, "error": 0}, "errors": 0, "depth": 1, "start": "2026-11-12 09:21:15.178", "wall_ms": 16420, "finished": false, "critical_path": ["2p"], "critical_ms": 16420, "slowest_scripts": [{"script": "zz_scgraph_test.slow.exe", "processes": 1, "total_ms": 1569, "max_ms": 1569, "errors": 0}, {"script": "zz_scgraph_test.c.exe", "processes": 1, "total_ms": 0, "max_ms": 0, "errors": 0}], "logs": 2, "truncated": false, "timed_out": false, "nodes": [{"pid": "2p", "parent_id": null, "depth": 0, "script": "zz_scgraph_test.slow.exe", "state": "running", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:21:15.178", "planned": "2026-11-12 09:21:15", "start": "2026-11-12 09:21:30.029", "end": null, "wait_ms": 14851, "duration_ms": 1569, "running_so_far": true, "offset_ms": 0, "start_offset_ms": 14851, "attempts": 1, "max_attempts": 1, "error": null, "children": 1, "logs": 2, "log_lines": [{"id": "187", "time": "2026-11-12 09:21:30.043", "status": "OK", "msg": "[---- Begin script ----]", "key": null, "value": null}, {"id": "188", "time": "2026-11-12 09:21:30.043", "status": "OK", "msg": "slow start", "key": "step", "value": "slow"}], "params": {}, "critical": true}, {"pid": "2q", "parent_id": "2p", "depth": 1, "script": "zz_scgraph_test.c.exe", "state": "wait", "login": "admin", "nodename": "DEV_N1", "flow": null, "flow_pos": null, "flow_step": null, "created": "2026-11-12 09:21:30.052", "planned": "2026-11-12 09:31:30", "start": null, "end": null, "wait_ms": 1546, "duration_ms": null, "running_so_far": false, "offset_ms": 14874, "start_offset_ms": null, "attempts": 0, "max_attempts": 1, "error": null, "children": 0, "logs": 0, "log_lines": [], "params": {}, "critical": false}]}
Too many log lines asked
admin
stack tree "2g" "{\"logs\": 1000}"
mentdb
ERROR: Sorry, an error appears (the parameter 'logs' must be an integer from 0 to 200).
stack trees
Description
The last executions started in the stack (the processes without parent), newest first, 50 at most: {nodename, now, returned, counts_truncated (true when the counts of the trees were cut at 20000 processes or 15 s), rows: [{pid, ref (the pid as stack tree takes it), script, flow, login, state, created, start, end, duration_ms (of this process), processes, errors, running, waiting (in its tree, found as stack tree does: the flows started inside are counted), wall_ms (of its tree), attempts, error}]}
The last executions started in the stack (the processes without parent), newest first, 50 at most: {nodename, now, returned, counts_truncated (true when the counts of the trees were cut at 20000 processes or 15 s), rows: [{pid, ref (the pid as stack tree takes it), script, flow, login, state, created, start, end, duration_ms (of this process), processes, errors, running, waiting (in its tree, found as stack tree does: the flows started inside are counted), wall_ms (of its tree), attempts, error}]}
admin
stack trees "{\"state\": \"done\"}"
mentdb
ERROR: Sorry, an error appears (the parameter 'state' must be all, wait, running, closed or error).
stack trees <json_params>
Description
The last executions with parameters: script (a part of the script or flow name, taken as it is: _ and % are not wildcards), state (all, wait, running, closed, error), from and to (on the creation date: yyyy-MM-dd, yyyy-MM-dd HH:mm or yyyy-MM-dd HH:mm:ss, to includes the whole day or minute), login, limit (50, 1 to 1000), roots_only (true: false lists every process), node
The last executions with parameters: script (a part of the script or flow name, taken as it is: _ and % are not wildcards), state (all, wait, running, closed, error), from and to (on the creation date: yyyy-MM-dd, yyyy-MM-dd HH:mm or yyyy-MM-dd HH:mm:ss, to includes the whole day or minute), login, limit (50, 1 to 1000), roots_only (true: false lists every process), node
Parameters
json_params: The parameters - String - required
json_params: The parameters - String - required
admin
stack trees "{\"script\": \"zz_scgraph_test\"}"
mentdb
{"nodename": "DEV_N1", "now": "2026-11-12 09:23:09.163", "returned": 5, "counts_truncated": false, "rows": [{"pid": "2p", "ref": "\"DEV_N1\" 2p", "script": "zz_scgraph_test.slow.exe", "flow": null, "login": "admin", "state": "closed", "created": "2026-11-12 09:21:15.178", "start": "2026-11-12 09:21:30.029", "end": "2026-11-12 09:22:15.059", "duration_ms": 45030, "processes": 2, "errors": 0, "running": 0, "waiting": 1, "wall_ms": 113985, "attempts": 1, "error": null}, {"pid": "2n", "ref": "\"DEV_N1\" 2n", "script": "zz_scgraph_test.slow.exe", "flow": null, "login": "admin", "state": "closed", "created": "2026-11-12 09:11:30.651", "start": "2026-11-12 09:12:00.005", "end": "2026-11-12 09:12:45.023", "duration_ms": 45018, "processes": 2, "errors": 0, "running": 0, "waiting": 0, "wall_ms": 629799, "attempts": 1, "error": null}, {"pid": "2h", "ref": "\"DEV_N1\" 2h", "script": "zz_scgraph_test.slow.exe", "flow": null, "login": "admin", "state": "error", "created": "2026-11-12 09:04:30.162", "start": "2026-11-12 09:05:00.032", "end": "2026-11-12 09:05:00.048", "duration_ms": 16, "processes": 1, "errors": 1, "running": 0, "waiting": 0, "wall_ms": 29886, "attempts": 1, "error": "line 1 >>> zz_scgraph_test.slow.exe \ line 2 >>> stack \"date addt (date now) \\\\\"SECOND\\\\\" 600;\" zz_scgraph_test.c.exe ; \ line 1 >>> date addt \"2026-11-12 09:05:00\" SECOND 600 ; \ \ [[[ Sorry, the field m..."}, {"pid": "2g", "ref": "\"DEV_N1\" 2g", "script": "zz_scgraph_test.root.exe", "flow": null, "login": "admin", "state": "closed", "created": "2026-11-12 09:04:30.152", "start": "2026-11-12 09:05:00.031", "end": "2026-11-12 09:05:00.375", "duration_ms": 344, "processes": 6, "errors": 1, "running": 0, "waiting": 0, "wall_ms": 120298, "attempts": 1, "error": null}, {"pid": "2a", "ref": "\"DEV_N1\" 2a", "script": "zz_scgraph_test.root.exe", "flow": null, "login": "admin", "state": "closed", "created": "2026-11-12 09:01:41.411", "start": "2026-11-12 09:02:00.035", "end": "2026-11-12 09:02:00.387", "duration_ms": 352, "processes": 6, "errors": 1, "running": 0, "waiting": 0, "wall_ms": 109041, "attempts": 1, "error": null}]}
A day that does not exist
admin
stack trees "{\"from\": \"2026-02-30\"}"
mentdb
ERROR: Sorry, an error appears (the parameter 'from' is not a valid date).
