diff --git a/chap/Fedora.tex b/chap/Fedora.tex index 217f505..b3ed4c8 100644 --- a/chap/Fedora.tex +++ b/chap/Fedora.tex @@ -10,6 +10,10 @@ Les paquets sont du modèle RPM\index{RPM} à la mode de Red-Hat et DNF\index{dnf} semble être l'outil de prédilection pour les gérer. +Pour mettre à jour~: + +\texttt{\# dnf upgrade'} + Pour chercher un binaire précis~: \texttt{\# dnf provides '*/interpolator'} @@ -34,6 +38,46 @@ de gcc : \texttt{gcc \$(COPT) -I/usr/include/netpbm -c \$<}, dont la portabilité est à vérifier. +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +\section{Gni ?}\index{memtest86} +\label{memtest86:fedora} + +Ayant des soucis de \textsf{kernelpanic} avec une ancienne machine +Dell\footnote{d'origine catalano-ariégeoise} j'ai voulu faire un +test approfondi de la RAM. DNF m'a permis de trouver le paquet +\texttt{memtest86+}, puis de l'installer (comme je procède +depuis le siècle dernier) afin de l'avoir sous la main au prochain +reboot. Non. Rien. + +Mmmm... Reboot, un shell root, et je découvre \texttt{memtest-setup} +qui semble pouvoir faire une partie du travail. La manpage +confirme. Action. + + +\begin{verbatim} +[tth@laserbox ~]# memtest-setup +GRUB 2 template installed. +Do not forget to regenerate your grub.cfg by: + # grub2-mkconfig -o /boot/grub2/grub.cfg +Setup complete. +[tth@laserbox ~]# grub2-mkconfig -o /boot/grub2/grub.cfg +Generationg Grub configuration file ... +Found memtest image: /boot/elf-memtest86+-5.31 +done +[tth@laserbox ~]# _ +\end{verbatim} + +Angoisse\dots + +Et j'ai eu raison. Le memtest apparait bien dans le menu de grub, +mais bon, il fait un gros \textbf{paf} dès le lancement en me +parlant d'une \textsf{unexpected interrupt} vraiment féroce. +Relisons calmement la page de man~: + +% XXX insert manpage here +XXX\index{XXX} + + % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \section{Comment installer ffmpeg ?} diff --git a/chap/IRC.tex b/chap/IRC.tex index 4492d1a..5024689 100644 --- a/chap/IRC.tex +++ b/chap/IRC.tex @@ -12,7 +12,7 @@ configurer. On se retrouve vite dans des situations critiques, du genre un \#canal où il n'y a plus de @op, et donc, on ne peut -plus changer le topix, et là, \textbf{ça craint vraiment} ! +plus changer le topic, et là, \textbf{ça craint vraiment} ! % ============================================================== @@ -36,4 +36,9 @@ pinpin0: çhârsèt ? \end{verbatim} % ============================================================== +\section{hexchat} +\index{hexchat} +Client graphique bien efficace. + +% ============================================================== diff --git a/chap/X11.tex b/chap/X11.tex index 22476a5..29d0933 100644 --- a/chap/X11.tex +++ b/chap/X11.tex @@ -18,7 +18,7 @@ Comment faire pour visualiser la plénitude des formes de mes fontes ? D'après la manpage : -\textit{Xephyr is a kdrive server that outputs to a window on a pre-existing +\textsl{Xephyr is a kdrive server that outputs to a window on a pre-existing "host" X display. Think Xnest but with support for modern extensions like composite, damage and randr.} @@ -26,11 +26,14 @@ D'après la manpage : si simple qua ça. Par exemple, quelle est la méthode à mettre en œuvre pour avoir le clavier en Azerty\index{azerty} ? - + +XXX\index{XXX} %------------------------------------------------------------------- \section{Numlock} +Vous l'avez voulu, le voici~: + \begin{verbatim} #include #include @@ -98,7 +101,19 @@ $ C'est simple, non ? +%------------------------------------------------------------------- +\section{XCB}\index{XCB} + +Vous avez pratiqué la \textsl{Xlib} ? Avez-vous aimé ? +\textsc{[oui]} et \textsc{[non]} sont deux réponses valables. +Si vous ne savez pas quoi répondre, vous n'avez pas compris +la question. + +% +% https://xcb.freedesktop.org/tutorial/basicwindowsanddrawing/ +% %------------------------------------------------------------------- + diff --git a/chap/backups.tex b/chap/backups.tex index 6721c46..45f20d1 100644 --- a/chap/backups.tex +++ b/chap/backups.tex @@ -34,3 +34,11 @@ trop les temps de backup ? Quid de juste rsync sur ton serveur et faire les tgz à l'autre bout (tu profiteras ainsi pleinement du coté incrémental d'rsync) ? + +% =============================================================== +\section{rsync}\index{rsync} + +\index{XXX} +\textsl{A fast, versatile, remote (and local) file-copying tool.} + +% =============================================================== diff --git a/chap/curses.tex b/chap/curses.tex index 48d03ae..34a6343 100644 --- a/chap/curses.tex +++ b/chap/curses.tex @@ -21,7 +21,7 @@ replacement for 4.4BSD classic curses, which has been discontinued. Bien entendu, nous commencerons par l'ECM traditionnel de rigueur. -\lstinputlisting[language=C]{ex_curses.c} +\lstinputlisting[language=C]{code/ex_curses.c} La première étape consiste à initialiser et configurer le moteur interne de ncurses, et à régler l'interaction clavier/écran. diff --git a/chap/debug.tex b/chap/debug.tex index f078644..c9b3e12 100644 --- a/chap/debug.tex +++ b/chap/debug.tex @@ -5,8 +5,30 @@ Quand plus rien ne marche, reste-il encore un espoir ? Il existe bien entendu des outils \textsl{mainstream} tels que le classique \texttt{gdb}\index{gdb}, mais il en existe une foultitude d'autres, injustement méconnus. -En voici quelques-uns. +Nous allons en voir quelques-uns. +% ============================================================== + +\section{Gdb}\index{gdb} + + +GDB is a source-level debugger, capable of breaking programs at +any specific line, displaying variable values, and determining +where errors occurred. Currently, gdb supports C, C++, D, +Objective-C, Fortran, Java, OpenCL C, Pascal, assembly, Modula-2, +Go, and Ada. \textsc{A must-have for any serious programmer}. + +\subsection{ddd} + +DDD is a graphical front-end for GDB and other command-line debuggers. +Using DDD, you can see what is going on “inside” another program while +it executes—or what another program was doing at the moment it crashed. + +\subsection{xxgdb} + +xxgdb is a simple but powerful graphical interface to the GNU +debugger gdb. A more powerful (but slower and much bigger) interface +is available in the ddd package. % ============================================================== @@ -18,18 +40,12 @@ Comme vous le savez tous, un appel système est \textbf{le} moyen de communication qu'utilise un process utilisateur pôur demander un service au noyau. -\begin{lstlisting}[language=C] -#include -int main(int argc, char *argv[]) -{ -printf("Hello world.\n"); -return 0; -} -\end{lstlisting} +\lstinputlisting[language=C]{code/hello.c} Un exemple canonique, n'est-il pas ? Ce bout de code affichant quelque chose à l'écran, il doit bien y avoir un appel au noyau -qui traine par là. Nous allons donc le chercher% +qui traine par là pour écrire vers la sortie standard. +Nous allons donc le chercher% \footnote{En trichant un peu, je l'avoue, je connais son nom.} \begin{verbatim} diff --git a/chap/grub.tex b/chap/grub.tex index f01f5f9..da502c6 100644 --- a/chap/grub.tex +++ b/chap/grub.tex @@ -3,11 +3,17 @@ Successeur pour certaines distributions du vénérable \texttt{lilo}\footnote{Linux Loader}\index{lilo}, le Grub, aka \textsl{Grand Unified Bootloader} est nettement plus -complexe, mais permet (parait-il) de faire beaucoup plus de choses +complexe, mais permet (parait-il) de faire beaucoup plus de choses. + +\section{Astuces} + +Pour installer \texttt{memtest86+} dans une Fedora, c'est en page +\pageref{memtest86:fedora}. \section{Questions} \begin{itemize} \item comment passer la carte VGA\index{VGA} en 80x43 ? +\item comment booter un disque FreeDOS\index{FreeDOS} ? \end{itemize} diff --git a/chap/hardware.tex b/chap/hardware.tex index 1c72552..b2156b1 100644 --- a/chap/hardware.tex +++ b/chap/hardware.tex @@ -68,9 +68,9 @@ est la limite\footnote{Comme à peu près tout dans la vie.} \section{Disques durs} Iozone ? Bonnie ? Smart\index{smart} ? UUID\index{uuid} ? -Ddrescue ? +Ddrescue\index{ddrescue} ? -\subsection{blkid} +\subsection{blkid \& lsblk} À mi-chemin entre le matériel et le système, la commande \texttt{blkid}\index{blkid} affiche quelques informations @@ -85,6 +85,24 @@ et surtout les partitions qu'ils contiennent~: \item PARTUID \end{itemize} + +\vspace{1em} + +Quand à \texttt{lsblk}\index{lsblk}, elle affiche +le même genre d'information, mais en plus joli +(j'ai utilisé l'option \texttt{-i} pour que le résultat +passe mieux à l'impression)~: + +\begin{verbatim} +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +sda 8:0 0 232.9G 0 disk ++-sda1 8:1 0 18.6G 0 part / ++-sda2 8:2 0 3.8G 0 part [SWAP] ++-sda3 8:3 0 488M 0 part /boot ++-sda4 8:4 0 210G 0 part /home +\end{verbatim} + + % ----------------------------------------------------------- \subsection{Smart}\index{smart} @@ -98,21 +116,21 @@ idéal, la prédiction des pannes. \begin{verbatim} smartctl -a /dev/sda Print a large amount of SMART information for drive /dev/sda . - - smartctl -s off /dev/sdd - Disable SMART monitoring and data log collection on drive /dev/sdd . \end{verbatim} % ----------------------------------------------------------- -\subsection{fsck}\index{fsck} +\subsection{fsck}\index{fsck}\index{fuck} \textsl{Check and repair a Linux filesystem} +Fortune du jour : \textsf{Franchement, là, je préfère que ce soit vous qui prenne la +tronçonneuse, parce que là, c'est pas beau à voir\dots} + % ----------------------------------------------------------- \subsection{tune2fs}\index{tune2fs} \textsl{Adjust tunable filesystem parameters on ext2/ext3/ext4 -filesystems} +filesystems}\footnote{You can tune a fs, but you can't tuna fish}. % ----------------------------------------------------------- diff --git a/chap/son.tex b/chap/son.tex index 7ddc279..7639e79 100644 --- a/chap/son.tex +++ b/chap/son.tex @@ -105,7 +105,7 @@ d'une application to output audio using a simple API on a wide variety of platforms.}). Elle supporte une grande variété de formats. -\lstinputlisting[language=C]{ao_example.c} +\lstinputlisting[language=C]{code/ao_example.c} diff --git a/chap/threads.tex b/chap/threads.tex index f29aae3..0c92b5d 100644 --- a/chap/threads.tex +++ b/chap/threads.tex @@ -3,7 +3,10 @@ % ---------------------------------------------------------------- -Ahemmm, par quoi commencer\footnote{Par de l'aspirine ?} ? Par un +Ahemmm, par quoi commencer\footnote{Par de l'aspirine ?} ? +La programmation avec les fils d'exécution est un espace +rempli de chausse-trappes. +Par un extrait de la page \texttt{pthreads(6)} ? Voilà, ça c'est bien : \begin{quote} diff --git a/ao_example.c b/code/ao_example.c similarity index 100% rename from ao_example.c rename to code/ao_example.c diff --git a/ex_curses.c b/code/ex_curses.c similarity index 100% rename from ex_curses.c rename to code/ex_curses.c diff --git a/main.tex b/main.tex index 1d0503f..1344022 100644 --- a/main.tex +++ b/main.tex @@ -73,7 +73,7 @@ Your mileage may vary\dots % ============================================================== \input{chap/shell} -\input{chap/editeurs} +% \input{chap/editeurs} \input{chap/son} \input{chap/image} \input{chap/reseau}