|
@@ -1,6 +1,8 @@
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
# SPDX-License-Identifier: ISC
|
|
|
|
|
|
+import os
|
|
|
+
|
|
|
import pexpect
|
|
|
import pexpect.replwrap
|
|
|
|
|
@@ -108,6 +110,11 @@ class Emulator(object):
|
|
|
if kernel_cmdline:
|
|
|
qemu_cmd += ["-append", " ".join(kernel_cmdline)]
|
|
|
|
|
|
+ self.logfile.write(f"> host cpu count: {os.cpu_count()}\n")
|
|
|
+ ldavg = os.getloadavg()
|
|
|
+ ldavg_str = f"{ldavg[0]:.2f}, {ldavg[1]:.2f}, {ldavg[2]:.2f}"
|
|
|
+ self.logfile.write(f"> host loadavg: {ldavg_str}\n")
|
|
|
+ self.logfile.write(f"> timeout multiplier: {self.timeout_multiplier}\n")
|
|
|
self.logfile.write("> starting qemu with '%s'\n" % " ".join(qemu_cmd))
|
|
|
self.qemu = pexpect.spawn(qemu_cmd[0], qemu_cmd[1:],
|
|
|
timeout=5 * self.timeout_multiplier,
|