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:
- https://github.com/containers/conmon-rs/blob/main/README.md on what conmon-rs does.
- https://github.com/containers/conmon-rs/blob/main/docs/architecture.md on how the server and the client work together.
- https://github.com/containers/conmon-rs/blob/main/docs/install.md on how to install, verify and build it.
- https://github.com/containers/conmon-rs/blob/main/docs/server.md on the command line.
- https://github.com/containers/conmon-rs/blob/main/docs/protocols.md on the RPCs and the attach and streaming protocols.
- https://github.com/containers/conmon-rs/blob/main/README.md#documentation on the other documents, like configuring CRI-O, logging and troubleshooting.
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
tracingwriter 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
tracingfeature: 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
--versionand theversionRPC.
Functionsยง
- run
- Run conmonrs: print the version or start the server, depending on the command line.