Gets the PID of the process. Returns None if the PID cannot be determined
(self)
| 437 | return str(self) |
| 438 | |
| 439 | def get_pid(self): |
| 440 | """Gets the PID of the process. Returns None if the PID cannot be determined""" |
| 441 | pid = self.__get_pid() |
| 442 | if pid: |
| 443 | LOG.info("Found PID %s for %s" % (pid, " ".join(self.cmd))) |
| 444 | else: |
| 445 | LOG.info("No PID found for process cmdline: %s. Process is dead?" % |
| 446 | " ".join(self.cmd)) |
| 447 | return pid |
| 448 | |
| 449 | def get_pids(self): |
| 450 | """Gets the PIDs of the process. In some circumstances, a process can run multiple |