Drop cgroup conditional

cgroup is only checked on runtime if the column CGROUP is selected.

cgroup is currently disabled by default, but most distributions do
enable it.

Drop the cgroup configuration switch, to reduce the maintenance cost.
This commit is contained in:
Christian Göttsche
2020-09-21 12:30:25 +02:00
committed by cgzones
parent 267014cbfe
commit c88c80e3bd
6 changed files with 6 additions and 30 deletions

View File

@ -644,8 +644,6 @@ static void LinuxProcessList_readOpenVZData(LinuxProcess* process, const char* d
#endif
#ifdef HAVE_CGROUP
static void LinuxProcessList_readCGroupFile(LinuxProcess* process, const char* dirname, const char* name) {
char filename[MAX_NAME + 1];
xSnprintf(filename, MAX_NAME, "%s/%s/cgroup", dirname, name);
@ -684,8 +682,6 @@ static void LinuxProcessList_readCGroupFile(LinuxProcess* process, const char* d
process->cgroup = xStrdup(output);
}
#endif
#ifdef HAVE_VSERVER
static void LinuxProcessList_readVServerData(LinuxProcess* process, const char* dirname, const char* name) {
@ -1294,11 +1290,9 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
LinuxProcessList_readDelayAcctData(this, lp);
#endif
#ifdef HAVE_CGROUP
if (settings->flags & PROCESS_FLAG_LINUX_CGROUP) {
LinuxProcessList_readCGroupFile(lp, dirname, name);
}
#endif
if (settings->flags & PROCESS_FLAG_LINUX_OOM) {
LinuxProcessList_readOomData(lp, dirname, name);