Skip to content

feat(connd): use IPAccounting for systemd service data usage metrics#1214

Merged
vmenge merged 8 commits into
mainfrom
vm/data-usage-metrics
May 19, 2026
Merged

feat(connd): use IPAccounting for systemd service data usage metrics#1214
vmenge merged 8 commits into
mainfrom
vm/data-usage-metrics

Conversation

@vmenge
Copy link
Copy Markdown
Collaborator

@vmenge vmenge commented May 18, 2026

new

  • adds a reporter to connd to count data usage per systemd service by leveraging the IPAccounting option

manual tests

  • tested on a dev diamond orb

do not merge

note

  • not viable unless we re-enable BPF on the pearl kernel

@vmenge vmenge marked this pull request as ready for review May 19, 2026 11:52
@vmenge vmenge requested a review from a team as a code owner May 19, 2026 11:52
) -> Result<HashMap<String, IpAccounting>> {
let mut ip_accountings = HashMap::new();

for (unit, service) in systemd.loaded_services().await? {
Copy link
Copy Markdown
Contributor

@sky-mart sky-mart May 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you could have done it in a functional manner ;)

Comment thread orb-connd/src/systemd.rs

let mut services = Vec::with_capacity(units.len());

for (name, _, _, _, _, _, object_path, _, _, _) in units {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about a comment about other parameters we ditch here?

@vmenge vmenge merged commit a4852a4 into main May 19, 2026
23 checks passed
@vmenge vmenge deleted the vm/data-usage-metrics branch May 19, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants