# psutils **Repository Path**: happyd0ggie/psutils ## Basic Information - **Project Name**: psutils - **Description**: Process utilities on linux writen in Python. - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-13 - **Last Updated**: 2022-03-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # psutils Process utilities written in Python without third-party libraries. # Usage ``` from psutils import PsUtils psutil = PsUtils() psutil.get_process_id_by_name("bash") psutil.process_is_running("bash") psutil.process_is_running("/usr/share/code/code") ``` # Note Argument to function paremeter must be uniq in all possible `/proc//cmdline`. e.g. - process 1, start cmdline is `/usr/sbin/code` - process 2, start cmdline is `/usr/bin/code2` You should pass argument `/usr/sbin/code`, not `code`, because `code` also in process 2's cmdline. Only in this way, we can distinguish two different process by its cmdline.