diff options
| -rwxr-xr-x | run_case_study.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/run_case_study.py b/run_case_study.py index b073468..86c6775 100755 --- a/run_case_study.py +++ b/run_case_study.py | |||
| @@ -36,12 +36,12 @@ def ID2PID(lookupID): | |||
| 36 | res = None | 36 | res = None |
| 37 | # Find benchmark PID (avoid getting shell or numactl PID) | 37 | # Find benchmark PID (avoid getting shell or numactl PID) |
| 38 | try: | 38 | try: |
| 39 | res = subprocess.check_output("pgrep -af ' " + lookupID + " ' | grep -v numactl | cut -d ' ' -f 1", shell=True) | 39 | res = subprocess.check_output("pgrep -af ' " + lookupID + " ' | grep -v numactl", shell=True) |
| 40 | except: | 40 | except: |
| 41 | res = None | 41 | res = None |
| 42 | if res: | 42 | if res: |
| 43 | # Ignore the newline | 43 | # Ignore the newline |
| 44 | return res.decode("utf-8").strip() | 44 | return res.decode("utf-8").split(" ")[0].strip() |
| 45 | else: | 45 | else: |
| 46 | return None | 46 | return None |
| 47 | 47 | ||
