Skip to main content

Crate conmonrs

Crate conmonrs 

Source
Expand description

A pod level OCI container runtime monitor for Linux.

A container engine like CRI-O starts one conmonrs per pod and talks to it over a Capโ€™n Proto RPC interface on a UNIX socket, which this crate serves. The crate is the server only, the Go client lives in the same repository under pkg/client. The repository holds the full documentation:

Modulesยง

async_fd ๐Ÿ”’
Waiting for descriptors which tokio has no type of its own for, like pidfds, terminals, epoll and inotify instances.
attach ๐Ÿ”’
The attach sockets of the containers, see the attach socket section of docs/protocols.md: the stdin of the clients towards the container and the container output towards the clients.
channel ๐Ÿ”’
A bounded channel with any number of senders and receivers, for the stdio channels of the containers and the stdin of their attach clients.
child_reaper ๐Ÿ”’
Child process reaping and management.
config ๐Ÿ”’
Configuration related structures.
conmon_capnp
The generated Capโ€™n Proto RPC interface.
container_io ๐Ÿ”’
The stdio of the containers and execs, pipes or a terminal, which the server reads into the log drivers, the attach clients and the output of the execs.
container_log ๐Ÿ”’
The log drivers of the containers, which write the container output to the CRI log files or to journald.
exec_start ๐Ÿ”’
Starting an exec, of an exec_sync or a streaming one alike: the IO of the process, the PID file of its runtime and the runtime call, up to the registration of the process.
fs_util ๐Ÿ”’
File system helpers.
init ๐Ÿ”’
The setup of the server process before it serves: umask, OOM score, open files limit, malloc and transparent huge pages, the standard streams and the descriptors it inherited, its working directory and the subreaper flag, and giving the runtime calls the OOM score, huge pages setting and open files limits the server started with.
journal ๐Ÿ”’
A client for the native journal protocol (https://systemd.io/JOURNAL_NATIVE_PROTOCOL/) and a tracing writer which forwards the server logs to journald.
listener ๐Ÿ”’
Helpers for the listening sockets of the server: private sockets, socket paths of any length and the errors of the accept loops.
mutex ๐Ÿ”’
Lock helpers.
oom_watcher ๐Ÿ”’
Watching the cgroup of a container process for OOM kills, through the memory events of the unified hierarchy of cgroup v2. A host with cgroup v1, or with both in a hybrid setup, runs its containers without the detection.
process ๐Ÿ”’
Signalling, waiting for and reaping child processes without hitting another process which reused their PID.
random_id ๐Ÿ”’
Random IDs, for the tokens of the streaming server, which a client has to know to connect, and for names which must not collide.
rpc ๐Ÿ”’
The Capโ€™n Proto RPC interface of the server, one method for each call of proto/conmon.capnp.
runtime_args ๐Ÿ”’
The command line of the OCI runtime for a create, a restore or an exec.
server ๐Ÿ”’
The server process: its start and fork, its logging, the RPC socket it serves and its shutdown on a signal.
streaming_server ๐Ÿ”’
The streaming server of exec, attach and port forward sessions: the URLs with their one time tokens and the HTTP server their clients connect to.
tail ๐Ÿ”’
A buffer which keeps only the end of what got written to it.
telemetry ๐Ÿ”’
The OpenTelemetry tracing of the server, built with the tracing feature: the exporter of the spans and the trace context the clients pass with their requests.
terminal ๐Ÿ”’
Terminal console functionalities.
util ๐Ÿ”’
Small helpers which modules share that do not depend on each other otherwise.
version ๐Ÿ”’
Version information of conmonrs, for --version and the version RPC.

Functionsยง

run
Run conmonrs: print the version or start the server, depending on the command line.