]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/qemurunner: Add priority/nice information for running processes
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 20 Jul 2020 10:54:33 +0000 (11:54 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jul 2020 11:45:52 +0000 (12:45 +0100)
We're seeing failures due to system load. In theory we've set process
nice levels which should compensate for this. Add debugging so we can
find out if they're being correctly applied.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py
meta/lib/oeqa/utils/qemutinyrunner.py

index 01cbf52b8b1e6968b780c1dda2eec652ac913ed1..519aa9aa1e512b2880835a291fa85617dbc55b34 100644 (file)
@@ -264,7 +264,7 @@ class QemuRunner:
                 % (self.runqemu.poll(), os.path.isfile(self.qemu_pidfile), str(qemu_pid), os.path.exists("/proc/" + str(qemu_pid))))
 
             # Dump all processes to help us to figure out what is going on...
-            ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command '], stdout=subprocess.PIPE).communicate()[0]
+            ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,pri,ni,command '], stdout=subprocess.PIPE).communicate()[0]
             processes = ps.decode("utf-8")
             self.logger.debug("Running processes:\n%s" % processes)
             self._dump_host()
index 364005bd2d50da2dc15e95b8480e12fbaf32dfbd..5c92941c0a6a70f4d9a622b66151aaf0f28c0e17 100644 (file)
@@ -138,7 +138,7 @@ class QemuTinyRunner(QemuRunner):
         #
         # Walk the process tree from the process specified looking for a qemu-system. Return its [pid'cmd]
         #
-        ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command'], stdout=subprocess.PIPE).communicate()[0]
+        ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,pri,ni,command'], stdout=subprocess.PIPE).communicate()[0]
         processes = ps.decode("utf-8").split('\n')
         nfields = len(processes[0].split()) - 1
         pids = {}