Commit Graph

7 Commits

Author SHA1 Message Date
Benny Baumann c4239335b9 Skip system slice name
This shortens paths like /system.slice/system-postgres.slice/postgres@12-main.service to /[S]/postgres@12-main.
Without this some cgroup names for getty processes explode in length.
2022-03-06 19:56:25 +01:00
Benny Baumann 23b56193d7 Reduce column width spam by snapd 2022-03-06 19:56:25 +01:00
Christian Göttsche 61c9fe44a3 CGroupUtils: avoid unsigned integer underflow
Do not underflow count at the last iteration, which triggers UBSAN when
using -fsanitize=unsigned-integer-overflow. This is useful as those
underflows can be a result of a flawed counting logic (e.g. a counter
gets reduced more than increased).
2021-12-05 19:28:07 +01:00
Benny Baumann b98a4f8d56 Include support for legacy LXC cgroup naming 2021-11-28 20:19:10 +01:00
Benny Baumann 55e073a455 Use helpers for parsing of cgroup labels 2021-11-28 20:19:10 +01:00
Benny Baumann 550100327b Extract string writing/buffer handling into some callback 2021-11-28 20:19:10 +01:00
Benny Baumann 9dc964bb42 Compress cgroup names based on some heuristics 2021-11-28 20:19:10 +01:00