Llama Process Manager
Manages the lifecycle of a local LLAMA-Server OS process.
Responsibilities:
Launching the server process with a caller-provided command line
Capturing stdout / stderr on daemon threads
Polling the
/healthendpoint until the server is readyGraceful + forced shutdown
Finding a free TCP port
Parameters
log
Logging callback (LogLevel, message).
Properties
Functions
Link copied to clipboard
Finds a free TCP port starting from preferredPort. Probes upward (up to 20 attempts) until an available port is found. Falls back to an OS-assigned ephemeral port if all probed ports are busy.
Link copied to clipboard
Link copied to clipboard
Stops the server process gracefully. Tries destroy() first, then destroyForcibly() after a timeout.