Skip to content

ananicy-cpp.service isn't starting propperly and needs to be restarted manually for Cgroups to work. #207

@Wabuo

Description

@Wabuo

To my inexperienced eye, it looks like the ananicy-cpp.service should be started by a later target, because it seems like Cgroups aren't available yet when it tries to start.

Or depend on something on the lines of wants cgoups2.online.target (not a real thing)
Or it should fail — sleep and then retry.

Anyways here the status of ananicy-cpp.service after boot up, it will stay like this indefinitely for me.

 systemctl status ananicy-cpp.service
● ananicy-cpp.service - Ananicy-Cpp - ANother Auto NICe daemon in C++
     Loaded: loaded (/usr/lib/systemd/system/ananicy-cpp.service; enabled; preset: disabled)
     Active: active (running) since Mon 2025-08-25 13:58:28 +08; 11h ago
 Invocation: c003515de73741ca809beddf54b540c4
   Main PID: 752 (ananicy-cpp)
      Tasks: 4 (limit: 17691)
     Memory: 12.7M (high: 16M, max: 64M, available: 3.2M, peak: 17.7M, swap: 392K, swap peak: 6M)
        CPU: 1min 42.493s
     CGroup: /system.slice/ananicy-cpp.service
             └─752 /usr/bin/ananicy-cpp start

Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: Ananicy Cpp
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.258] [info] Starting Ananicy
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.263] [warning] cgroup2 at /sys/fs/cgroup/ananicy_test_cgroup2 doesn't have a cpu controller available, skipping
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.263] [info] Creating Cgroups...
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.263] [warning] Cgroups are not available on this platform (or are not enabled)
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.263] [warning] Cgroups are not available on this platform (or are not enabled)
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.263] [warning] Cgroups are not available on this platform (or are not enabled)
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.263] [info] Finished creating Cgroups...
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.265] [info] Doing a full scan
Aug 25 13:58:28 wisejackal-laptop ananicy-cpp[752]: [2025-08-25 13:58:28.280] [info] Worker initialized with 1376 rules

And here after a manual systemctl restart ananicy-cpp.service

 systemctl status ananicy-cpp.service
● ananicy-cpp.service - Ananicy-Cpp - ANother Auto NICe daemon in C++
     Loaded: loaded (/usr/lib/systemd/system/ananicy-cpp.service; enabled; preset: disabled)
     Active: active (running) since Tue 2025-08-26 01:06:55 +08; 5s ago
 Invocation: 76c5493219664c869ef83d40179e5ad8
   Main PID: 150502 (ananicy-cpp)
      Tasks: 4 (limit: 17691)
     Memory: 7.9M (high: 16M, max: 64M, available: 8M, peak: 8.2M)
        CPU: 91ms
     CGroup: /system.slice/ananicy-cpp.service
             └─150502 /usr/bin/ananicy-cpp start

Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.534] [info] Config apply_ionice: true
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.534] [info] Config cgroup_load: true
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.534] [info] Config apply_sched: true
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.534] [info] Config apply_nice: true
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: Ananicy Cpp
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.551] [info] Starting Ananicy
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.552] [info] Creating Cgroups...
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.553] [info] Finished creating Cgroups...
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.554] [info] Doing a full scan
Aug 26 01:06:55 wisejackal-laptop ananicy-cpp[150502]: [2025-08-26 01:06:55.565] [info] Worker initialized with 1376 rules

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions