1

My kernel supports cgroup and cgroup2 and both of them are mounted. I'm interested in finding out if any of the applications I am running are using the legacy cgroup version 1? Is there anyway to determine what application has not been upgraded to use cgroup version 2?

Evan Carroll
  • 30,763
  • 48
  • 183
  • 315

1 Answers1

1

I would like better information then this, it's an assumption that I will delete if this gets a proper answer.

cgroup v2 which I know is in use on my system will not permit the unmounting,

$ sudo umount -f /sys/fs/cgroup/unified
umount: /sys/fs/cgroup/unified: target is busy.

However, the cgroup v1 dirs can be unmounted just fine, regardless of systemd having set them up at boot. I assume this is because nothing is using them; I assume further that if cgroup v2 were not in use, they could be unmounted.

So on the basis of not being able to unmount cgroup version 2, and assuming a similar behavior of cgroup version 1 you can determine if anything is using cgroup version 1 by simply trying ot unmount it.

Evan Carroll
  • 30,763
  • 48
  • 183
  • 315