Unitctl.Stats (unitctl v0.1.0)

Copy Markdown View Source

Runtime statistics for a systemd-backed unit.

Values are read from systemd/cgroup D-Bus properties. A field is nil when the running systemd version does not expose that property or accounting is not enabled for the unit.

Summary

Functions

Builds runtime stats from a map.

Types

t()

@type t() :: %Unitctl.Stats{
  active_state: String.t() | nil,
  control_group: String.t() | nil,
  cpu_usage_nsec: non_neg_integer() | nil,
  io_read_bytes: non_neg_integer() | nil,
  io_write_bytes: non_neg_integer() | nil,
  ip_egress_bytes: non_neg_integer() | nil,
  ip_ingress_bytes: non_neg_integer() | nil,
  main_pid: non_neg_integer() | nil,
  memory_current: non_neg_integer() | nil,
  memory_peak: non_neg_integer() | nil,
  sub_state: String.t() | nil,
  tasks_current: non_neg_integer() | nil,
  unit: String.t()
}

Functions

new(attrs)

@spec new(map()) :: t()

Builds runtime stats from a map.