13 ps_stdouterr=subprocess.Popen(
"ps -efww|grep cmsScimarkLaunch|grep -v grep|grep -v 'sh -c'",shell=
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout
15 ps_lines=ps_stdouterr.readlines()
24 print(
"Found process:\n%s"%line[:-1])
26 print(
"Killing process with PID %s"%PID)
27 kill_stdouterr=subprocess.Popen(
"kill %s"%PID,shell=
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.read()
31 if os.path.exists(
"cmsScimark_%s.log"%core):
33 mkdir_stdouterr=subprocess.Popen(
"mkdir cmsScimarkResults_cpu%s"%core,shell=
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.read()
34 print(mkdir_stdouterr)
36 harvest_stdouterr=subprocess.Popen(
"cmsScimarkParser.py -i cmsScimark_%s.log -o cmsScimarkResults_cpu%s"%(core,core),shell=
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.read()
37 print(harvest_stdouterr)
39 print(
"No cmsScimark_%s.log file was found for cpu%s, log might be in another directory!"%(core,core))
41 print(
"No cmsScimarkLaunch processes found in the ps -ef output")