lkmpg icon indicating copy to clipboard operation
lkmpg copied to clipboard

Unclear note about term emulator vs virtual console, and journalctl and dmesg

Open Aster89 opened this issue 3 years ago • 1 comments

The following note about term emulator vs. console seems to suggest that in a virtual console we always see the output of printk (or pr_info, or others) in the terminal. It doesn't seem to be the case. I always have to check sudo dmesg to find whatever I print from within the module.

Furthermore the note mention journalctl, but that shows the action of insmod and rmmod that I perform, not the output of the printing functions; again, that is shown in dmesg, which is unfortunately used but not presented first, just like journalctl.

I'm still at the beginning (I've read up to chapter 5.6 "Device Drivers"), but I think this is exactly what gives value to my comment.

Should I have better understanding in the future, I'll try to improve this wording myself, if somebody will not have done it yet.

https://github.com/sysprog21/lkmpg/blob/7b38f3713a1eaa5e17d955531d04f535e8b72517/lkmpg.tex#L167-L180

Aster89 avatar Oct 05 '22 20:10 Aster89

Exactly, they are confusing. A pseudo{terminal,tty}, or PTY is a pair of pseudo-device endpoints which establish asynchronous, bidirectional communication IPC channel (with two ports) between two or more processes. An example using PTY is xterm-pty, which adds a PTY layer to xterm.js. For X11, xterm and rxvt are generally terminal emulators using tty, and current LKMPG does not distinguish from tty and pty though.

jserv avatar Oct 14 '22 17:10 jserv