%% $Header: /cvsroot/lcdp/lpic/general-linux-2/slides/gl2.107.2.slides.tex,v 1.2 2003/08/20 14:00:22 geoffr Exp $


\input{gl2.slide-header.tex}
\usepackage{epsfig}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%==============================================================================
%% \begin{slide} %ghr
%%   \listofslides
%% \vfill \end{slide}
%------------------------------------------------------------------------------

%----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80->
\begin{slide} %================================================================
\begin{center} \LARGE \textsf{-- General Linux 2 -- \\
Manage Printers \& Print Queues} \\[2mm]
\large  \textsf{(Linux Professional Institute Certification)}\\[1mm]

\normalsize\end{center}

\footnote{Copyright \copyright\ 2002 Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation---either version 2 of the License or (at your option) any later version.}
 
\scriptsize
\begin{verbatim} 
   .~.         Slides for a talk by Andrew Eager
   /V\         geoffrey robertson        
  // \\        geoffrey@zip.com.au
  @._.@ 
\end{verbatim} 
\tiny 
\begin{verbatim}
$Id: gl2.107.2.slides.tex,v 1.2 2003/08/20 14:00:22 geoffr Exp $ 
\end{verbatim} 
\normalsize  
\vfill \end{slide} %-----------------------------------------------------------
%----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80->

%==============================================================================
%==============================================================================
\begin{slide} %ghr
  \slideheading{Manage printers \& print queues}
  \begin{description}
  \item[1.107.2] {\bf \underline{Manage printers \& print queues}}
  \item[1.107.3] Print files
  \item[1.107.4] Install \& configure local \& remote printers
\end{description}
\vfill \end{slide} %-----------------------------------------------------------
  

%==============================================================================
%==============================================================================
\begin{slide} %AE
\slideheading{Manage printers \& print queues}
\slidesubheading{Objective} 

Candidates should be able to manage print queues and user print jobs. This objective includes monitoring print server and user print queues and troubleshooting general printing problems.


\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide} %AE
\slideheading{Manage printers \& print queues}
\slidesubheading{Key files, terms, and utilities}
\begin{description}
\item[lpc] Printing control
\item[lpq] Display Print queue
\item[lprm] Job removal
\item[lpr] Job submission
\item[\texttt{/etc/printcap}] - Configuration file
\end{description}
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide} %AE
\slideheading{}
\slidesubheading{Resources of interest}
\begin{description} 
\item Printing-HOWTO
\item Printing-Usage-HOWTO
\end{description}
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
%% \begin{slide}{} %ghr
%% \Slidecontents
%% \vfill \end{slide} %--------------------------------------------------------


%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{LPC - Printer Control}
\begin{itemize}
\item LPC Is used to control a printer or print job
\item Can be run interactively.
\item Usage is:

\texttt{lpc [command [argument]]}
\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{LPC - Printer Control}
\bf {Example 1 - Non Interactive:}
\begin{alltt} 
\small {
# lpc status
 Printer           Printing Spooling Jobs  Server Subserver 
lp@Node4            enabled  enabled    0    none    none
}
\end{alltt}

\bf {Example 2 - Interactive}
\begin{alltt}
\small {
# lpc
lpc> status
 Printer           Printing Spooling Jobs  Server Subserver 
lp@Node4            enabled  enabled    0    none    none
lpc> quit
}
\end{alltt}

\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{LPC Commands}
For a complete list of commands, use the command \texttt{lpc help}.
Some of the more important commands to know are:
\begin{description}
\item[abort] - Immediately terminate active spool \& disable printing
\item[disable] - Stop spooling for this printer
\item[enable] - Start spooling for this printer
\item[down] - Disable spooling \& printing
\item[up] - Enable spooling \& printing
\item[stop] - Stop printing after current job is complete
\item[start] - Enable spooling \& start printing
\item[quit] - Exit from interactive mode
\item[help] - Show all commands
\end{description}
\vfill \end{slide}

%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{LPQ - Display Printer Queue}
\begin{itemize}
\item Every print job is assigned a \textit{job-id}
\item You need the job-id to remove or reorder a job in the queue
\item lpq shows the job-id along with information about the job.
\end{itemize}
Usage is:
\begin{alltt}
# lpq [-P \textit{printer}] [\textit{Job-id}]
\end{alltt}

\vfill \end{slide}

%==============================================================================
\begin{slide}{} %Andrew Eager
  \slideheading{LPQ - Example}
\bf{Example - Show all jobs on default Queue}
\begin{alltt} \small {
# lpq
Printer: lp@Node4 'lp0' (dest HPLjet@node10.aes)
 Queue: 2 printable jobs
 Server: pid 27354 active
 Unspooler: pid 27356 active
 Status: waiting for subserver to exit at 12:22:58.553
 Rank   Owner/ID        Class Job Files   ....
 1      root@Node4+353     A   353 /etc/hosts ....
 2      root@Node4+357     A   357 /etc/ntp.conf ....
Printer: HPLjet@Node10 'lp0' (printing disabled ...
}
\end{alltt}
\vfill \end{slide}

%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{LPRM - Remove job(s) from Queue}
\begin{itemize}
\item lprm is used to remove jobs from a queue
\item jobs can be removed by:
\begin{itemize}
\item by job-id (use lpq to find out)
\item by user
\end{itemize}
\end{itemize}
Usage is:
\begin{alltt}
# lprm [-P \textit{printer}] [\textit{Job-id} ...] [\textit{user} ...]
\end{alltt}
\vfill \end{slide}

%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{LPRM - Example}
\bf{Example - Remove all jobs owned by root}

\begin{alltt}
\small {
# lprm root
Printer lp@Node4:
  checking perms 'root@Node4+353'
  dequeued 'root@Node4+353'
  checking perms 'root@Node4+357'
  dequeued 'root@Node4+357'
Printer HPLjet@Node10:
# lpq
}
\end{alltt}
\vfill \end{slide}

%==============================================================================


\end{document}

