You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
It is highly recommended that you extract, compile and load all the examples this guide discusses from a console.
You should not be working on this stuff in X Window System.
Modules can not print to the screen like \cpp|printf()| can, but they can log information and warnings, which ends up being printed on your screen, but only on a console.
If you \sh|insmod| a module from an xterm, the information and warnings will be logged, but only to your systemd journal.
You will not see it unless you look through your \sh|journalctl| .
See \ref{sec:helloworld} for details.
To have immediate access to this information, do all your work from the console.
\end{enumerate}
\section{Headers}
\label{sec:headers}
The text was updated successfully, but these errors were encountered:
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.
The following note about term emulator vs. console seems to suggest that in a virtual console we always see the output of
printk
(orpr_info
, or others) in the terminal. It doesn't seem to be the case. I always have to checksudo dmesg
to find whatever I print from within the module.Furthermore the note mention
journalctl
, but that shows the action ofinsmod
andrmmod
that I perform, not the output of the printing functions; again, that is shown indmesg
, which is unfortunately used but not presented first, just likejournalctl
.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.
lkmpg/lkmpg.tex
Lines 167 to 180 in 7b38f37
The text was updated successfully, but these errors were encountered: