Getting Started Cameras & Video Detection & Recording Automation & Events Actions Integration & Connectivity Network & Discovery AI & Remote Control MQTT Modbus ZeroMQ System & Administration Use Cases Troubleshooting About & Legal
Home / Documentation / Process
Knowledge base

Process

Process runs and supervises an external operating-system process from Banalytics, captures output, can send stdin commands, and stops the process tree when the component stops.

Run a managed helper process beside the agent

Use Process to start a shell, script, service, CLI tool, bridge, local API server, tunnel, data collector, AI sidecar, or protocol adapter that should be controlled from the Banalytics lifecycle.

Treat it as a privileged integration point. It can run host commands, access files, open network ports, and interact with local devices according to the permissions of the agent process.

01

Define the process role

Set Title to the operational purpose, for example local bridge, camera SDK helper, Python AI service, sensor collector, or maintenance shell.

02

Use a clear command line

Set Command line to a command or script wrapper. For pipes, quoting, redirection, or shell operators, call the shell explicitly or put the logic into a script.

03

Choose console or file IO

Leave IO capture enabled for interactive console use. Redirect output to files for noisy programs, batch exports, or logs that must survive UI reconnects.

Configuration parameters

ParameterRequiredDescriptionDefault
Title
YesDisplay name of the managed process.None
Command line
YesCommand to execute. The default depends on the operating system.bash or Windows command shell
Environment variables
OptionalAdditional environment variables, one KEY=VALUE pair per line. Invalid lines prevent startup.Empty
Working directory
OptionalWorking directory for the process. Relative paths and redirect file names are resolved from this directory when set.Agent working directory
Inherit IO
YesWhen enabled, the child process uses the same console as Banalytics. UI output capture and stdin commands are unavailable in this mode.Disabled
Redirect error stream to output
ConditionalMerges stderr into stdout when IO is not inherited.Disabled
Redirect input (file)
OptionalFile to use as stdin. When set, interactive command input from the UI is unavailable.Empty
Redirect output (file)
OptionalFile to append stdout to instead of capturing stdout in the web console.Empty
Redirect error (file)
ConditionalFile to append stderr to when IO is not inherited and stderr is not merged into stdout.Empty
Wait execution timeout (sec)
YesConfiguration field for execution timeout. Current lifecycle is primarily driven by process exit and component start/stop.0
History length (lines)
YesNumber of captured output lines kept in memory for the web console. Valid range: 10-10000.100
Command history size
YesNumber of interactive commands remembered for this process. Valid range: 0-500.50

Supervise a process and its process tree

Start, stop, and restart of the component control the external process. On stop, descendants and the main process are destroyed, so commands that need graceful shutdown should handle signals quickly or wrap shutdown logic in a script.

When IO is captured, the UI can show stdout/stderr, send commands to stdin, keep command history, and store favorite commands. File redirection moves those streams away from the web console.

CLI

Interactive shell

Run a local shell or CLI and send commands from the Banalytics UI.

SVC

Sidecar service

Supervise a helper service that exposes HTTP, MQTT, WebSocket, TCP, serial, Modbus, OPC UA, or another protocol.

LOG

Managed IO

Capture output for the UI or redirect high-volume streams to files.

Run external tools for integration and supervision

Interactive and scripted execution

01

Interactive shell

Keep the default shell command, leave Inherit IO disabled, and leave redirect fields empty. The UI can show output and send commands to stdin.

02

Prepared script

Set Command line to the interpreter plus script path and Working directory to the tool folder. Use Environment variables for URLs, tokens, device names, or ports.

03

Complex command line

For pipes, quoting, redirects, or shell operators, call the shell explicitly or put the complex logic into a script because the process launcher is not a full shell parser.

Long-running services and adapters

01

Local service

Run a helper that exposes an API or protocol on localhost or the local network while Banalytics supervises lifecycle.

02

Protocol bridge

Run software that converts between systems, for example serial-to-MQTT, camera SDK bridge, custom REST gateway, PLC adapter, or Python/Node event publisher.

03

Data acquisition worker

Launch a worker that reads sensors, files, serial devices, USB devices, or network streams and writes results to files, database, MQTT, HTTP endpoint, or stdout.

04

AI/model sidecar

Run Python, Node, or native inference services outside the JVM to isolate dependency conflicts and native crashes from the main agent process.

05

One-shot maintenance command

Use a script that performs a maintenance action and exits with code 0 on success. Make non-zero exit codes intentional and log enough detail.

Input and output redirection

01

File-based input

Set Redirect input (file) when the program expects stdin from a file and should not receive interactive UI commands.

02

File-based output

Set Redirect output (file) for large logs, reports, exports, or output that must survive UI reconnects.

03

Separate error log

Set Redirect error (file) when stderr must be stored separately. Enable Redirect error stream to output for one chronological stream.

Operational notes

01

Stop is forceful

On stop, the process tree is destroyed. Avoid commands that require long graceful shutdown unless the script handles signals quickly.

02

Captured output is memory-bounded

Captured output is kept up to History length (lines). For noisy programs, redirect output to files and keep the in-memory history modest.

03

Ctrl+C behavior differs by OS

Ctrl+C from the UI sends SIGINT on Linux/macOS and uses taskkill on Windows. Programs that ignore signals may still be terminated by stop or restart.

04

Some settings disable UI input/output

Redirect input (file) or Inherit IO disables UI stdin. Output redirection writes streams to files instead of the web console.

05

Use working directory for relative paths

Redirect file names are resolved relative to Working directory when it is set.

06

Environment lines must be valid

Environment variables must use one KEY=VALUE pair per line. Invalid lines prevent startup.

07

Restrict permissions

Do not run untrusted commands, and restrict who can start, stop, configure, or send commands to this component.

08

Implement strict timeout in wrapper

If a strict runtime timeout is required, implement it in the script or command wrapper because lifecycle is primarily driven by process exit and component start/stop.

Related Core pages

Related components and pages