This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psutil | |
import time | |
import argparse | |
import sys | |
def find_process_by_name(name: str): | |
process_list = [] | |
for proc in psutil.process_iter(): | |
try: | |
pinfo = proc.as_dict(attrs=['pid', 'name', 'create_time']) |