Skip to content

mstat fails to run on cgroups v2 #5

Description

@peterzhu2118

mstat fails to run on 22.04 and later due to switching to cgroups v2. It fails with the following error message:

2022/12/06 11:04:10 internal error: Read: EOF/0/[]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
2022/12/06 11:04:10 NewPoller: poll: cg.Stat: returned nil Memory stats

However, there is currently a workaround. However, the workaround will require modifying your bootloader to force it to boot with cgroups v1.

  1. Open /etc/default/grub.
  2. Replace the line GRUB_CMDLINE_LINUX="" with GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0".
  3. Run sudo update-grub to update your bootloader.
  4. Reboot your system.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions