\input{gl2.slide-header-beamer} \errorcontextlines=99 %% Subtopic Number = '1.107.2' %% Title from filename: 'Manage printers and print queues' %% Weight: 1 %% Description: %% 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. %% Key files, terms, and utilities include: %% /etc/printcap %% lpc %% lpq %% lprm %% lp \title{1.107.2\\Manage printers and print queues\\Weight 1} \author[Andrew Eager]{Andrew Eager \texttt{andrew.eager@aes-pl.com.au} \and Geoff Robertson \texttt{} \and Nick Urbanik \texttt{}\\ {\tiny This document Licensed under GPL---see section~\ref{sec:license}}}% \subtitle{Linux Professional Institute Certification --- 102}% \mode
{\chead{1.107.2}}% % TODO, Nick: % Update everything to Cups! \begin{document} \maketitle \mode
{\thispagestyle{empty}} \begin{frame} %\frametitle{Outline} \mode {% \frametitle{Outline} %\footnotesize \begin{multicols}{2} \tableofcontents \end{multicols} % You might wish to add the option [pausesections] }% %\mode
%{% % \tableofcontents %}% \end{frame} \section{Context} \label{sec:context} \begin{frame} \frametitle{Topic 107 Printing [3]}% \framesubtitle{Where we are up to}% \begin{description} % \uline depends on \usepackage[normalem]{ulem}: \item[1.107.2] \textbf{\uline{Manage printers and print queues [1]}} \item[1.107.3] Print files [1] \item[1.107.4] Install and configure local and remote printers [1] \end{description} \end{frame} %----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80-> % \begin{frame}[fragile] % %================================================================ % \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 % \end{frame} %----------------------------------------------------------- %----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80-> \section{Objective} \label{sec:objective} \begin{frame} % AE \frametitle{Description of Objective}% \framesubtitle{1.107.2\ \ Manage printers and print queues}% \mode{\Large}% 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. \end{frame} \begin{frame} % AE \frametitle{Key files, terms, and utilities include:} \framesubtitle{1.107.2\ \ Manage printers and print queues}% \mode{\large}% \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} \end{frame} \section{Resources} \label{sec:resources} \begin{frame}[fragile] % AE \frametitle{Resources of interest} \begin{description} \item Printing-HOWTO \item Printing-Usage-HOWTO \end{description} \end{frame} \section{Printer control with \texttt{lpc}} \label{sec:lpc} \begin{frame} \frametitle{\texttt{lpc} --- Printer Control} \begin{itemize} \item \texttt{lpc} Is used to control a printer or print job \item Can be run interactively. \item Usage is: \par \texttt{lpc [\meta{command} [\meta{argument}]]} \end{itemize} \end{frame} \subsection{lpc examples} \label{sec:lpc-examples} \begin{frame}[fragile] \frametitle{\texttt{lpc} --- Printer Control}% \begin{block}{Example 1 --- Non Interactive:} \mode{\small} \begin{semiverbatim} \cmd{lpc status} Printer Printing Spooling Jobs Server Subserver lp@Node4 enabled enabled 0 none none \end{semiverbatim} \end{block} \par% \begin{block}{Example 2 --- Interactive} \mode{\small} \begin{semiverbatim} \cmd{lpc} lpc> status Printer Printing Spooling Jobs Server Subserver lp@Node4 enabled enabled 0 none none lpc> quit \end{semiverbatim} \end{block} \end{frame} \subsection{lpc commands} \label{sec:lpc-commands} \begin{frame}[fragile] \frametitle{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} With the CUPS printing system, \texttt{lpc status} is the only command implemented. Use \texttt{lpadmin} instead for controlling the queue. \end{frame} %============================================================================== \section{Show printer queue: \texttt{lpq}} \label{sec:lpq} \begin{frame}[fragile] \frametitle{\texttt{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{semiverbatim} $ lpq [-P \textit{printer}] [\textit{Job-id}] \end{semiverbatim}%$ \end{frame} \subsection{\texttt{lpq} example} \label{sec:lpq-example} %============================================================================== \begin{frame}[fragile] \frametitle{\texttt{lpq} --- Example}% \textbf{Example --- Show all jobs on default Queue} \begin{semiverbatim}\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{semiverbatim} \end{frame} %============================================================================== \section{Removing printer jobs: \texttt{lprm}} \label{sec:lprm} \begin{frame}[fragile] \frametitle{\texttt{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{semiverbatim} # lprm [-P \textit{printer}] [\textit{Job-id} ...] [\textit{user} ...] \end{semiverbatim} \end{frame} %============================================================================== \subsection{lprm example} \label{sec:lprm-example} \begin{frame}[fragile] \frametitle{\texttt{lprm} --- Example}% \textbf{Example --- Remove all jobs owned by root} \begin{semiverbatim}\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{semiverbatim} \end{frame} \mode {% \begin{frame} \frametitle{Topics Covered} %\footnotesize %\begin{multicols}{2} \tableofcontents[pausesections,pausesubsections] %\end{multicols} % You might wish to add the option [pausesections] \end{frame} } \section{License Of This Document} \label{sec:license} \begin{frame} \frametitle{License Of This Document}% \raggedright% Copyright \copyright\ 2005, 2002 Andrew Eager , Geoffrey Robertson , Nick Urbanik \par You can redistribute modified or unmodified copies 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. \end{frame} \end{document}