Engine::PluginRet NrDyingDescendants::run()

in src/oomd/plugins/NrDyingDescendants.cpp [53:67]


Engine::PluginRet NrDyingDescendants::run(OomdContext& ctx) {
  for (const CgroupContext& cgroup_ctx : ctx.addToCacheAndGet(cgroups_)) {
    if (auto nr = cgroup_ctx.nr_dying_descendants()) {
      if ((lte_ && *nr <= count_) || (!lte_ && *nr > count_)) {
        if (debug_) {
          OLOG << "nr_dying_descendants=" << *nr << (lte_ ? " <= " : " > ")
               << "count=" << count_;
        }
        return Engine::PluginRet::CONTINUE;
      }
    }
  }

  return Engine::PluginRet::STOP;
}