Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-20 07:59:01

0001 import subprocess
0002 
0003 from pandaharvester.harvesterconfig import harvester_config
0004 
0005 proc = subprocess.Popen(
0006     f"ps -l x -U {harvester_config.master.uname}",
0007     shell=True,
0008     stdout=subprocess.PIPE,
0009 )
0010 stdoutList = proc.communicate()[0].split("\n")
0011 for line in stdoutList:
0012     try:
0013         items = line.split()
0014         if len(items) < 6:
0015             continue
0016         pid = items[3]
0017         nice = int(items[7])
0018         if "master.py" in line and nice > 0:
0019             reniceProc = subprocess.Popen(
0020                 f"renice 0 {pid}",
0021                 shell=True,
0022                 stdout=subprocess.PIPE,
0023             )
0024     except Exception:
0025         pass