def __init__(self, **kwargs): super(NginxMetricsCollector, self).__init__(**kwargs) self.processes = [Process(pid) for pid in self.object.workers] self.zombies = set() self.register(self.workers_count, self.memory_info, self.workers_fds_count, self.workers_cpu, self.status) if not self.in_container: self.register(self.workers_rlimit_nofile, self.workers_io)
def set_pid(self): self.pid = os.getpid() self.psutil_process = Process(self.pid)
def __init__(self, **kwargs): super(NginxMetricsCollector, self).__init__(**kwargs) self.processes = [Process(pid) for pid in self.object.workers] self.zombies = set()