[comp.sys.hp] batch and /usr/lib/cron/queuedefs

kap1@paideia.uchicago.edu (Dietrich Kappe.SYS ADMIN) (12/28/89)

If anyone could supply me with more information on batch, as well as
the format of the /usr/lib/cron/queuedefs file, I would be most greatful.

Dietrich Kappe

paul@prcrs.UUCP (Paul Hite) (12/29/89)

In article <6895@tank.uchicago.edu>, kap1@paideia.uchicago.edu (Dietrich Kappe.SYS ADMIN) writes:
> If anyone could supply me with more information on batch, as well as

batch is a shell script that contains:
	# @(#) $Revision: 27.1 $       
	at -qb
The -q is an undocumented option to "at" that specifies which queue to use
(the default is "a").  

> the format of the /usr/lib/cron/queuedefs file, I would be most greatful.
> 

Someone once posted some info on queuedefs in another group.  It was for a
Sun.  I hope it works the same on HP.  Anyway, here is the queuedefs file from
our 850:
	a.4j1n
	b.2j2n90w
	\/\/\/\ /
	| | |  |------>	This optional field is an integer followed by the
	| | |		keyletter "w".  It's the number of seconds to wait
	| | |		before retrying a job that couldn't run because too
	| | |		many jobs were already running.  Default = 60.	
	| | |
	| | |---------> This optional field is an integer followed by the
	| |		keyletter "n".  It's the nice value for jobs in this
	| |		queue.  Default = 2.
	| |
	| |-----------> This optional field is an integer followed by the
	| 		keyletter "j".  It's the max jobs allowed to be running
	| 		in the queue at one time.  Other jobs get deferred 
	| 		until something finishes.  In addition to this limit,
	| 		only 25 jobs may exist in all queues.  Default = 100.
	|		(I realize that the last two sentences are a little
	|		inconsistent but it's what was posted before.  Sorry.)
	|
	|-------------> This required field is a letter followed by a dot. It's
			the name of the queue.

This info is second-hand so don't flame me if it's wrong.  Hope this helps.

Paul Hite   PRC Realty Systems  McLean,Va   uunet!prcrs!paul    (703) 556-2243
                      DOS is a four letter word!

jsadler@misty.boeing.com (Jim Sadler) (12/30/89)

This info, format info for /usr/lib/cron/queuedefs file, should be in
the manual.  If it is what manual and page?  If not WHY NOT ?

	
jim sadler
206-234-9009	email	uunet!bcstec!jsadler|root  | hplabs!hpubvwa!b-mrda!jim

milburn@me10.lbl.gov (John Milburn) (01/03/90)

From the hp-ux 7.0 distribution:


     QUEUEDEFS(4)					  QUEUEDEFS(4)



     NAME
	  queuedefs - queue description file for at(1), batch(1), and
	  crontab(1)

     SYNOPSIS
	  /usr/lib/cron/queuedefs

     DESCRIPTION
	  The queuedefs file describes the characteristics of the
	  queues managed by cron(1M).  Each non-comment line in this
	  file describes one queue.  The format of the lines are as
	  follows:
	       q.[njobj][nicen][nwaitw]
	  The fields in this line are:

	       q    The name of the queue, such that a is the default
		    queue for jobs started by at(1), b is the queue
		    for jobs started by batch(1), and c is the queue
		    for jobs run from a crontab(1) file.  Queue names
		    d through y designate user defined queues.

	       njob The maximum number of jobs that can be run
		    simultaneously in that queue.  The default value
		    is 100.

	       nice The nice(1) value to give to all jobs in that
		    queue that are not run with a user ID of super-
		    user.  The default value is 2.

	       nwait
		    The number of seconds to wait before rescheduling
		    a job that was deferred because more than njob
		    jobs were running in that job's queue, or because
		    more than 25 jobs were running in all the queues.
		    The default value is 60.

     EXAMPLES
	  The following queuedefs file:
	       a.4j1n
	       b.2j2n90w
	  specifies that the a queue, for at(1) jobs, can have up to 4
	  jobs running simultaneously, and that those jobs will be run
	  with a nice(1) value of 1.  As no nwait value was given, if
	  a job cannot be run because too many other jobs are running,
	  cron(1M) will wait 60 seconds before trying again to run it.
	  The b queue, for batch(1) jobs, can have up to 2 jobs
	  running simultaneously.  Those jobs will be run with a
	  nice(1) value of 2.  If a job cannot be run because too many
	  other jobs are running, cron(1M) will wait 90 seconds before
	  trying again to run it.  All other queues can have up to 100
	  jobs running simultaneously, they will be run with a nice(1)
	  value of 2, and if a job cannot be run because too many
	  other jobs are running, cron(1M) will wait 60 seconds before
	  trying again to run it.

     SEE ALSO
	  at(1), batch(1), nice(1), crontab(1), cron(1M), proto(4)
John Milburn - Advanced Light Source - Lawrence Berkeley Laboratory
INTERNET: JEMilburn@lbl.gov   BITNET:    JEMilburn@LBL.bitnet
UUCP:      {...}!ucbvax!lbl.gov!JEMilburn
SnailMail: 1 Cyclotron Road 46-161 Berkeley, Ca. 94720  Ph:  (415) 486-6969

morrell@hpsal2.HP.COM (Michael Morrell) (01/03/90)

/ hpsal2:comp.sys.hp / jsadler@misty.boeing.com (Jim Sadler) /  8:39 am  Dec 29, 1989 /

This info, format info for /usr/lib/cron/queuedefs file, should be in
the manual.  If it is what manual and page?  If not WHY NOT ?
----------

I agree a man page should be provided for queuedefs.  Here is one that was
posted some time back.  I can not vouch for its accuracy.

   Michael
  ------------ /usr/man/man4/queuedefs.4 -------------------
.TH QUEUEDEFS 4
.SH NAME
queuedefs \- at/batch/cron queue description file
.SH SYNOPSIS
.LP
.B /usr/lib/cron/queuedefs
.SH DESCRIPTION
The
.I queuedefs\^
file describes the characteristics of the queues managed by
.IR cron (1M).
Each non-comment line in this file describes one queue.
The format of the lines are as follows:
.RS
.LP
\f2q\f3.\f1[\f2njob\f3j\f1][\f2nice\f3n\f1][\f2nwait\f3w\f1]
.RE
.LP
The fields in this line are:
.RS
.TP
.I q\^
The name of the queue.
.B a
is the default queue for jobs started by
.IR at (1);
.B b
is the default queue for jobs started by
.IR batch (1);
.B c
is the default queue for jobs run from a
.B crontab
file.
.TP
.I njob\^
The maximum number of jobs that can be run simultaneously in that queue; if
more than
.I njob\^
jobs are ready to run, only the first
.I njob\^
jobs will be run, and the others will be run as jobs that are currently running
terminate.  The default value is 100.
.TP
.I nice\^
The
.IR nice (1)
value to give to all jobs in that queue that are not run with a user
.SM ID
of super-user.  The default value is 2.
.TP
.I nwait\^
The number of seconds to wait before rescheduling a job that was deferred
because more than
.I njob\^
jobs were running in that job's queue, or because more than 25 jobs were
running in all the queues.  The default value is 60.
.RE
.LP
Lines beginning with
.B #
are comments, and are ignored.
.SH EXAMPLE
.RS
.nf
.ft B
a.4j1n
b.2j2n90w
.RE
.fi
.ft R
.LP
This file specifies that the
.B a
queue, for
.I at\^
jobs, can have up to 4 jobs running simultaneously; those jobs will be run with
a
.I nice\^
value of 1.  As no
.I nwait\^
value was given, if a job cannot be run because too many other jobs are running
.I cron\^
will wait 60 seconds before trying again to run it.
The
.B b
queue, for
.I batch\^
jobs, can have up to 2 jobs running simultaneously; those jobs will be run with
a
.I nice\^
value of 2.  If a job cannot be run because too many other jobs are running,
.I cron\^
will wait 90 seconds before trying again to run it.
All other queues can have up to 100 jobs running simultaneously; they will be
run with a
.I nice\^
value of 2, and if a job cannot be run because too many other jobs are running
.I cron\^
will wait 60 seconds before trying again to run it.
.SH FILES
/usr/lib/cron/queuedefs
.SH "SEE ALSO"
cron(1M)

jsadler@misty.boeing.com (Jim Sadler) (01/04/90)

/ misty:comp.sys.hp / milburn@me10.lbl.gov (John Milburn) /  1:54 pm  Jan  2, 1990 /
>From the hp-ux 7.0 distribution:

Man entry deleted for quedefs deleted
.
.
.

>John Milburn - Advanced Light Source - Lawrence Berkeley Laboratory
>INTERNET: JEMilburn@lbl.gov   BITNET:    JEMilburn@LBL.bitnet
UUCP:      {...}!ucbvax!lbl.gov!JEMilburn
>SnailMail: 1 Cyclotron Road 46-161 Berkeley, Ca. 94720  Ph:  (415) 486-6969
----------
Thank you

jim sadler

guy@auspex.auspex.com (Guy Harris) (01/04/90)

>From the hp-ux 7.0 distribution:

Yup, that's the man page I did (the "info posted in another group" for a
Sun was the SunOS version of the man page; I also did what I hoped was a
vanilla S5R3 version, and posted that as well).  They refer to
"non-comment lines", but deleted the bit that said

	Lines beginning with # are comments, and are ignored.

The S5R3 code doesn't specifically *check* for "#"; what it does is
ignore any lines that don't begin with characters other than "a" to (not
through) 'a'+NQUEUE - i.e., if the first character of the line isn't a
valid queue name, the line is ignored, and "#" isn't a valid queue name.

I don't know what the S5R2 version did, but if it did that or if the
HP-UX version is based on the S5R3 version, they should reinstate that
line for no other reason than to make the sentence

	Each non-comment line in this file describes one queue.

make sense.

BTW, I presume they also picked up my PROTO(4) page to describe ".proto"
files for "cron"/"at".  I don't know if AT&T picked up either one - they
didn't provide those pages in S5R2 or S5R3, which may be why it's not in
some systems.