Apache Mesos
Namespaces | Functions | Variables
cgroups Namespace Reference

Namespaces

 blkio
 
 cpu
 
 cpuacct
 
 devices
 
 event
 
 freezer
 
 memory
 
 net_cls
 

Functions

Try< std::string > prepare (const std::string &baseHierarchy, const std::string &subsystem, const std::string &cgroup)
 
bool enabled ()
 
Try< std::set< std::string > > hierarchies ()
 
Result< std::string > hierarchy (const std::string &subsystems)
 
Try< bool > enabled (const std::string &subsystems)
 
Try< bool > busy (const std::string &subsystems)
 
Try< std::set< std::string > > subsystems ()
 
Try< std::set< std::string > > subsystems (const std::string &hierarchy)
 
Try< Nothingmount (const std::string &hierarchy, const std::string &subsystems, int retry=0)
 
Try< Nothingunmount (const std::string &hierarchy)
 
Try< bool > mounted (const std::string &hierarchy, const std::string &subsystems="")
 
Try< Nothingcreate (const std::string &hierarchy, const std::string &cgroup, bool recursive=false)
 
Try< Nothingremove (const std::string &hierarchy, const std::string &cgroup)
 
Try< bool > exists (const std::string &hierarchy, const std::string &cgroup)
 
Try< std::vector< std::string > > get (const std::string &hierarchy, const std::string &cgroup="/")
 
Try< Nothingkill (const std::string &hierarchy, const std::string &cgroup, int signal)
 
Try< std::string > read (const std::string &hierarchy, const std::string &cgroup, const std::string &control)
 
Try< Nothingwrite (const std::string &hierarchy, const std::string &cgroup, const std::string &control, const std::string &value)
 
Try< bool > exists (const std::string &hierarchy, const std::string &cgroup, const std::string &control)
 
Try< std::set< pid_t > > processes (const std::string &hierarchy, const std::string &cgroup)
 
Try< std::set< pid_t > > threads (const std::string &hierarchy, const std::string &cgroup)
 
Try< Nothingassign (const std::string &hierarchy, const std::string &cgroup, pid_t pid)
 
Try< Nothingisolate (const std::string &hierarchy, const std::string &cgroup, pid_t pid)
 
process::Future< Nothingdestroy (const std::string &hierarchy, const std::string &cgroup="/")
 
process::Future< Nothingdestroy (const std::string &hierarchy, const std::string &cgroup, const Duration &timeout)
 
process::Future< bool > cleanup (const std::string &hierarchy)
 
Try< hashmap< std::string,
uint64_t > > 
stat (const std::string &hierarchy, const std::string &cgroup, const std::string &file)
 

Variables

const Duration DESTROY_TIMEOUT = Seconds(60)
 
const Duration FREEZE_RETRY_INTERVAL = Seconds(10)
 
const unsigned int THREAD_ASSIGN_RETRIES = 100
 

Function Documentation

Try<Nothing> cgroups::assign ( const std::string &  hierarchy,
const std::string &  cgroup,
pid_t  pid 
)
Try<bool> cgroups::busy ( const std::string &  subsystems)
process::Future<bool> cgroups::cleanup ( const std::string &  hierarchy)
Try<Nothing> cgroups::create ( const std::string &  hierarchy,
const std::string &  cgroup,
bool  recursive = false 
)
process::Future<Nothing> cgroups::destroy ( const std::string &  hierarchy,
const std::string &  cgroup = "/" 
)
process::Future<Nothing> cgroups::destroy ( const std::string &  hierarchy,
const std::string &  cgroup,
const Duration timeout 
)
bool cgroups::enabled ( )
Try<bool> cgroups::enabled ( const std::string &  subsystems)
Try<bool> cgroups::exists ( const std::string &  hierarchy,
const std::string &  cgroup 
)
Try<bool> cgroups::exists ( const std::string &  hierarchy,
const std::string &  cgroup,
const std::string &  control 
)
Try<std::vector<std::string> > cgroups::get ( const std::string &  hierarchy,
const std::string &  cgroup = "/" 
)
Try<std::set<std::string> > cgroups::hierarchies ( )
Result<std::string> cgroups::hierarchy ( const std::string &  subsystems)
Try<Nothing> cgroups::isolate ( const std::string &  hierarchy,
const std::string &  cgroup,
pid_t  pid 
)
Try<Nothing> cgroups::kill ( const std::string &  hierarchy,
const std::string &  cgroup,
int  signal 
)
Try<Nothing> cgroups::mount ( const std::string &  hierarchy,
const std::string &  subsystems,
int  retry = 0 
)
Try<bool> cgroups::mounted ( const std::string &  hierarchy,
const std::string &  subsystems = "" 
)
Try<std::string> cgroups::prepare ( const std::string &  baseHierarchy,
const std::string &  subsystem,
const std::string &  cgroup 
)
Try<std::set<pid_t> > cgroups::processes ( const std::string &  hierarchy,
const std::string &  cgroup 
)
Try<std::string> cgroups::read ( const std::string &  hierarchy,
const std::string &  cgroup,
const std::string &  control 
)
Try<Nothing> cgroups::remove ( const std::string &  hierarchy,
const std::string &  cgroup 
)
Try<hashmap<std::string, uint64_t> > cgroups::stat ( const std::string &  hierarchy,
const std::string &  cgroup,
const std::string &  file 
)
Try<std::set<std::string> > cgroups::subsystems ( )
Try<std::set<std::string> > cgroups::subsystems ( const std::string &  hierarchy)
Try<std::set<pid_t> > cgroups::threads ( const std::string &  hierarchy,
const std::string &  cgroup 
)
Try<Nothing> cgroups::unmount ( const std::string &  hierarchy)
Try<Nothing> cgroups::write ( const std::string &  hierarchy,
const std::string &  cgroup,
const std::string &  control,
const std::string &  value 
)

Variable Documentation

const Duration cgroups::DESTROY_TIMEOUT = Seconds(60)
const Duration cgroups::FREEZE_RETRY_INTERVAL = Seconds(10)
const unsigned int cgroups::THREAD_ASSIGN_RETRIES = 100