12 #ifndef ROOT_XrdProofdPriorityMgr
13 #define ROOT_XrdProofdPriorityMgr
28 #include "XrdOuc/XrdOucHash.hh"
29 #include "XrdOuc/XrdOucString.hh"
39 #define XPPM_NOPRIORITY 999999
81 char *val, XrdOucStream *cfg,
bool rcf);
85 int AddSession(
const char *u,
const char *
g,
int pid);
int RemoveSession(int pid)
Remove from the active list the session with ID pid.
void SetSchedOpt(int opt)
int SetNiceValues(int opt=0)
Recalculate nice values taking into account all active users and their priorities.
XrdProofdPriorityMgr(XrdProofdManager *mgr, XrdProtocol_Config *pi, XrdSysError *e)
Constructor.
void SetGroupPriority(const char *grp, int priority)
Change group priority. Used when a master pushes a priority to a worker.
int DoDirectiveSchedOpt(char *, XrdOucStream *, bool)
Process 'schedopt' directive.
XrdOucHash< XrdProofdPriority > fPriorities
int SetProcessPriority(int pid, const char *usr, int &dp)
Change priority of process pid belonging to user, if needed.
int DoDirectivePriority(char *, XrdOucStream *, bool)
Process 'priority' directive.
int DoDirective(XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
Update the priorities of the active sessions.
#define XrdSysMutexHelper
virtual ~XrdProofdPriorityMgr()
int AddSession(const char *u, const char *g, int pid)
Add to the active list a session with ID pid.
XrdProofdSessionEntry(const char *u, const char *g, int pid)
Constructor.
int SetPriority(int priority=XPPM_NOPRIORITY)
Change process priority.
int Config(bool rcf=0)
Run configuration and parse the entered config directives.
XrdOucHash< XrdProofdSessionEntry > fSessions
virtual ~XrdProofdSessionEntry()
Destructor.
void RegisterDirectives()
Register directives for configuration.