def doSet(self): limitPath = '/etc/security/limits.conf' errMsg = SharedFuncs.SetLimitsConf(["soft", "hard"], "stack", STACK, limitPath) if errMsg != "Success": self.result.val = "%s\n" % errMsg else: self.result.val = "Success to set openfile to %d\n" % STACK
def doSet(self): self.result.val = "" self.result.raw = "" limitPath = '/etc/security/limits.d/' if (os.path.isfile(os.path.join(limitPath, '91-nofile.conf'))): limitFile = '91-nofile.conf' else: limitFile = '90-nofile.conf' elk_env = DefaultValue.getEnv("ELK_SYSTEM_TABLESPACE") if (elk_env): expand_value = 640000 else: expand_value = 1000000 errMsg = SharedFuncs.SetLimitsConf(["soft", "hard"], "nofile", expand_value, os.path.join(limitPath, limitFile)) if errMsg != "Success": self.result.val = "%s\n" % errMsg else: self.result.val = "Success to set openfile to %d\n" % expand_value