gspl-qlist - display job queue
gspl-qlist [ -options ] [ job number ... ]
gspl-qlist outputs a table on standard output showing jobs on the GNUspool spool queue, including those queued on other hosts on the network.
Each line of the output corresponds to a single job, and by default the output is generally similar to the default format of the jobs screen of the gspl-pq(1) command, something like:
0024139 jmc report1 a4 23K 1 150 0026921 jmc prgm.c listing 12K 1 150 red:0021941 pbt report a4.lh 17K 2 150
The first field on each line is the numeric job number, preceded by a host name and a colon if on a remote machine.
Various options described below enable the user to control the output in various ways. The job data itself may also be extracted.
To limit the output to information about a given job or jobs, job numbers may be placed on the command line.
The environment variable on which options are supplied is GSPL_QLIST
and the environment variable to specify the help file is
SPRESTCONF
.
causes a summary of the other options to be displayed without taking further action.
restricts attention to jobs matching the class code given. This may be reduced further by the user's class code unless he/she has override class privilege.
cancel a -F option and restore the default format.
do not try to represent page numbers and counts on the output (this only affects the default format).
do try to represent page numbers and counts on the output (this only affects the default format).
Specify user defined output format. The string argument contains characters to be printed and symbols representing the required data fields. This option overrides and preceding -D option, and is itself overridden by a following -D option.
See the section on format codes for details of the format code sequences.
generate a header for each column of the output according to the field displayed there. The headers are taken from the message file, by default rest.help, which may be adjusted as required.
display only jobs local to the current host.
cancel the -H option.
cancel the -V option.
with the -V option, specify a range of pages to output.
A range may consist of single page numbers or subranges separated by commas, thus:
-V -P 1 -V -P 1,3,4-9 -V -P 2-7,12-
such arguments would respectively select page 1, pages 1, 3 and 4 to 9 and pages 2 to 7 and 12 to the end. Omitted numbers either side of the - denote ``the beginning'' and ``the end''.
restricts attention to jobs which have been printed.
List only jobs for, or which could be printed on the specified subset of printers. The set of printers may contain just one name, a list of names or a list of patters for matching printer names. Shell-like pattern matching applies to the pattern. You may well need to put quotes around the pattern to avoid misinterpretation by the shell.
This is further described in the pattern arguments section.
To cancel this argument, give a single - sign as an argument.
display jobs local to the current host and connected hosts.
restricts attention to jobs whose title matches the pattern given.
The pattern is further described in the pattern arguments section.
restricts attention to jobs owned by the given user or list of users given by a pattern.
The pattern is further described in the pattern arguments section.
cancel the job listing output and send the text of the job or jobs to standard output.
displays all jobs, canceling -y or -p.
restricts attention to jobs which have not been printed.
when listing jobs restricted by a -q argument, include jobs with no destination printer.
when listing jobs and printers restricted by a -q argument, do not include jobs without a destination printer.
Save all the current options in a .gnuspool file in the current directory.
Save all the current options in a .gnuspool file in the user's home directory.
The -q, -t and -u options may all be given a name, a comma-separated list of names or shell-like wildcard patterns. The patterns all take the standard form:
* | matches anything |
? | matches a single character |
[a-mp-ru] | matches any one character in the range of characters given |
[!n-z9] | matches any one character not in the range of characters given |
Be careful to enclose these sequences in quotes in case the shell misinterprets them.
For example
gspl-qlist -q ljet,ptr3 gspl-qlist -q 'ptr*,lp[1-9]' gspl-qlist -u 'j*' gspl-qlist -t 'Acc*'
The format string consists of a string containing the following character sequences, which are replaced by the corresponding job parameters. The string may contain various other printing characters or spaces as required.
Each column is padded, usually on the right, to the length of the longest entry. If a header is requested, the appropriate abbreviation is obtained from the message file and inserted.
insert a single %
sign
wattn
if the write attention message flag is set.
mattn
if the mail attention message flag is set.
class code
copies (right-justified)
page delimiter
delimiter number
post-processing flags
form type
``halted at'' page number.
hold time
job title.
size of job in bytes
position reached in bytes.
local
if local job only
mail
if mail completion flag set.
job number, prefixed by host name if remote.
odd/even/swap flags.
originating host (might be different if via gspl-rpr(1)).
printer destination
priority.
page reached.
retain
if retained on queue.
page range.
size in pages.
nohdr
if header suppressed.
delete time if not printed.
delete time if printed.
user name to be posted to.
user name owned by
submission or start time.
write
if write completion message flag set.
Note that the various strings such as nohdr etc are read from the message file also, so it is possible to modify them as required by the user.
The default format is
%N %u %h %f %Q %S %c %p %P
with the (default) -E option and
%N %u %h %f %L %K %c %p %P
with the -e option.
~/.gnuspool configuration file (home directory)
.gnuspool configuration file (current directory)
rest.help message file
space-separated options to override defaults.
location of alternative help file.
gspl-plist(1), gspl-pq(1), gspl-qchange(1), gspl-qdel(1), spsyntax(5), gnuspool.conf(5), gnuspool.hosts(5).
Various diagnostics are read and printed as required from the message file, by default rest.help.
Copyright (c) 2009 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.
John M Collins, Xi Software Ltd.