12 ps_stdouterr=subprocess.Popen(
"ps -efww|grep cmsScimarkLaunch|grep -v grep|grep -v 'sh -c'",shell=
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout
14 ps_lines=ps_stdouterr.readlines()
23 print(
"Found process:\n%s"%line[:-1])
25 print(
"Killing process with PID %s"%PID)
26 kill_stdouterr=subprocess.Popen(
"kill %s"%PID,shell=
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.read()
30 if os.path.exists(
"cmsScimark_%s.log"%core):
32 mkdir_stdouterr=subprocess.Popen(
"mkdir cmsScimarkResults_cpu%s"%core,shell=
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.read()
33 print(mkdir_stdouterr)
35 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()
36 print(harvest_stdouterr)
38 print(
"No cmsScimark_%s.log file was found for cpu%s, log might be in another directory!"%(core,core))
40 print(
"No cmsScimarkLaunch processes found in the ps -ef output")