Mads
Multi-Agent Distributed System
Loading...
Searching...
No Matches
Mads::detail::FdLimitPlan Struct Reference

#include <fd_limit.hpp>

Public Types

enum class  Action {
  NotSupported , Unset , Invalid , Unchanged ,
  Raise , Lower
}
 

Public Attributes

bool clamped = false
 
Action action = Action::Unset
 
uint64_t target = 0
 The soft limit that should end up in force.
 
std::string message
 One line, ready to print, explaining the limit and what was done to it.
 
bool warn = false
 True when message reports something the operator should act on.
 

Detailed Description

What should be done about the limit, and what to tell the operator. Pure: built from requested plus the observed limits, with no syscalls.

Definition at line 161 of file fd_limit.hpp.

Member Enumeration Documentation

◆ Action

Enumerator
NotSupported 

no per-process descriptor limit on this platform

Unset 

nothing configured; report the limit and leave it alone

Invalid 

configured value makes no sense; ignored, limit untouched

Unchanged 

the soft limit is already exactly what was asked for

Raise 

raise the soft limit to target

Lower 

lower the soft limit to target

Definition at line 162 of file fd_limit.hpp.

Member Data Documentation

◆ action

Action Mads::detail::FdLimitPlan::action = Action::Unset

Definition at line 177 of file fd_limit.hpp.

Referenced by Mads::detail::apply_fd_limit(), and Mads::detail::plan_fd_limit().

◆ clamped

bool Mads::detail::FdLimitPlan::clamped = false

Set when the request was above the hard limit and target had to be capped to it. Orthogonal to action, which still describes what happens to the soft limit: a clamped request can still raise, lower or change nothing at all.

Definition at line 175 of file fd_limit.hpp.

Referenced by Mads::detail::plan_fd_limit().

◆ message

std::string Mads::detail::FdLimitPlan::message

One line, ready to print, explaining the limit and what was done to it.

Definition at line 181 of file fd_limit.hpp.

Referenced by Mads::detail::plan_fd_limit().

◆ target

uint64_t Mads::detail::FdLimitPlan::target = 0

The soft limit that should end up in force.

Definition at line 179 of file fd_limit.hpp.

Referenced by Mads::detail::apply_fd_limit(), and Mads::detail::plan_fd_limit().

◆ warn

bool Mads::detail::FdLimitPlan::warn = false

True when message reports something the operator should act on.

Definition at line 183 of file fd_limit.hpp.

Referenced by Mads::detail::plan_fd_limit().


The documentation for this struct was generated from the following file: