Ciro Santilli
2018-11-11 10:57:23 UTC
https://superuser.com/questions/1373226/how-to-redirect-qemu-serial-output-to-both-a-file-and-the-terminal-or-a-port
I would like to be able to both interact with the system via the
command line, but also get the output to a file at the same time.
If I do:
qemu-sysem-x86_64 -serial stdio |& tee file
then it mostly works, but I would like to avoid any Bash operations
and let QEMU do the heavy lifting for me. For example, I'm using
Python, and it is not so simple to implement a reliable `tee` there.
If I do:
qemu-sysem-x86_64 -serial file:myfile
It redirects to the file and I can't give any input.
Is there a way to "combine" both `file:` and `stdio` to a single `-serial`?
Multiple `-serial` entries just create multiple serial ports instead
of modifying a single one.
I'm also interested if it works with telnet as in:
-serial tcp::1234,server,nowait
I would like to be able to both interact with the system via the
command line, but also get the output to a file at the same time.
If I do:
qemu-sysem-x86_64 -serial stdio |& tee file
then it mostly works, but I would like to avoid any Bash operations
and let QEMU do the heavy lifting for me. For example, I'm using
Python, and it is not so simple to implement a reliable `tee` there.
If I do:
qemu-sysem-x86_64 -serial file:myfile
It redirects to the file and I can't give any input.
Is there a way to "combine" both `file:` and `stdio` to a single `-serial`?
Multiple `-serial` entries just create multiple serial ports instead
of modifying a single one.
I'm also interested if it works with telnet as in:
-serial tcp::1234,server,nowait