Home | History | Annotate | Download | only in utils

Lines Matching refs:identifier

67     def is_alive(self, identifier):
75 identifier: string or int, Used to identify the program to check.
83 if isinstance(identifier, str):
84 self.run('ps aux | grep -v grep | grep %s' % identifier)
85 elif isinstance(identifier, int):
86 self.signal(identifier, 0)
88 raise ValueError('Bad type was given for identifier')
94 def get_command_pids(self, identifier):
102 identifier: The search term that identifies the program.
105 An array of ints of all pids that matched the identifier.
108 'ps -C %s --no-heading -o pid:1' % identifier, ignore_status=True)
117 def get_pids(self, identifier):
124 identifier: A search term that identifies the program.
126 Returns: An array of all pids that matched the identifier, or None
130 result = self.run('ps aux | grep -v grep | grep %s' % identifier)
213 def kill(self, identifier, timeout=10):
216 Kills all programs that match an identifier through the shell. This
218 that match the identifier until either all are dead or the timeout
224 identifier: A string used to identify the program.
228 if isinstance(identifier, int):
229 pids = [identifier]
231 pids = list(self.get_pids(identifier))