zerodds-monitor-cli

Tools — Monitoring. Command-line front end zerodds-monitor for the metrics registry of the ZeroDDS runtime.

zerodds-monitor-cli builds the binary zerodds-monitor. It starts a DcpsRuntime on a domain, lets it run for a given time and then prints a snapshot of the process-wide metrics registry, or serves the registry over HTTP as Prometheus /metrics. Registry, Prometheus rendering and HTTP server come from zerodds-monitor (crates/monitor). The library part of this crate, zerodds_monitor_cli, holds the argument parser (parse_args, Command, SnapshotArgs, ServeArgs, SnapshotFormat, ParseError).

zerodds-monitor snapshot [-d DOMAIN] [--duration DUR] [-f text|prometheus]
zerodds-monitor serve    [-d DOMAIN] [-a ADDR] [--duration DUR]
zerodds-monitor names
  • Defaults: domain 0; snapshot collects for 5 s; serve listens on 127.0.0.1:9991 and runs until SIGINT or SIGTERM unless --duration is given. Durations are written as 5, 30s, 2m or 1h.
  • names prints a fixed list of 15 metric names from zerodds_monitor::metric_names.
  • The configuration options shared with other ZeroDDS programs are accepted: --config PATH, --set PATH=VALUE, --check-config.
  • Exit codes: 0 success, 2 argument or configuration error, 3 DDS or I/O error.

Man page: zerodds-monitor.

Consumers

  • No crate in the workspace depends on it.

Features

  • same-host-shm (default): enables zerodds-dcps/same-host-shm. Participants on the same host exchange unicast datagrams with the tool over a shared-memory channel instead of loopback UDP. ZERODDS_SAME_HOST_SHM=0 turns it off at run time.

Status

  • std. src/lib.rs has no forbid(unsafe_code) attribute. Safety classification in the crate docs: COMFORT.
  • Builds the binary zerodds-monitor. The binary has doc = false, because its rustdoc name would collide with the library of crates/monitor.
  • Test functions in the source: 7 in src/lib.rs, 9 in tests/cli_smoke.rs.

zerodds-monitor-cli

Werkzeuge — Überwachung. Kommandozeilen-Frontend zerodds-monitor für das Metrik-Register der ZeroDDS-Laufzeit.

zerodds-monitor-cli baut das Binary zerodds-monitor. Es startet eine DcpsRuntime auf einer Domain, lässt sie eine vorgegebene Zeit laufen und gibt dann einen Schnappschuss des prozessweiten Metrik-Registers aus oder stellt das Register über HTTP als Prometheus /metrics bereit. Register, Prometheus-Ausgabe und HTTP-Server stammen aus zerodds-monitor (crates/monitor). Der Bibliotheksteil dieser Crate, zerodds_monitor_cli, enthält den Argument-Parser (parse_args, Command, SnapshotArgs, ServeArgs, SnapshotFormat, ParseError).

zerodds-monitor snapshot [-d DOMAIN] [--duration DUR] [-f text|prometheus]
zerodds-monitor serve    [-d DOMAIN] [-a ADDR] [--duration DUR]
zerodds-monitor names
  • Voreinstellungen: Domain 0; snapshot sammelt 5 s lang; serve lauscht auf 127.0.0.1:9991 und läuft bis SIGINT oder SIGTERM, sofern --duration nicht angegeben ist. Dauern werden als 5, 30s, 2m oder 1h geschrieben.
  • names gibt eine feste Liste von 15 Metriknamen aus zerodds_monitor::metric_names aus.
  • Die mit anderen ZeroDDS-Programmen gemeinsamen Konfigurationsoptionen werden angenommen: --config PATH, --set PATH=VALUE, --check-config.
  • Exit-Codes: 0 Erfolg, 2 Fehler in Argumenten oder Konfiguration, 3 DDS- oder E/A-Fehler.

Man-Page: zerodds-monitor.

Konsumenten

  • Keine Crate im Workspace hängt davon ab.

Features

  • same-host-shm (Standard): schaltet zerodds-dcps/same-host-shm ein. Participants auf demselben Host tauschen Unicast-Datagramme mit dem Werkzeug über einen Kanal im gemeinsamen Speicher aus statt über Loopback-UDP. ZERODDS_SAME_HOST_SHM=0 schaltet das zur Laufzeit ab.

Status

  • std. src/lib.rs hat kein Attribut forbid(unsafe_code). Einstufung in der Crate-Dokumentation (safety classification): COMFORT.
  • Baut das Binary zerodds-monitor. Das Binary hat doc = false, weil sein rustdoc-Name mit der Bibliothek aus crates/monitor kollidieren würde.
  • Testfunktionen im Quelltext: 7 in src/lib.rs, 9 in tests/cli_smoke.rs.