HPlogo Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00): HP 3000 MPE/iX Computer Systems > Chapter 3 System Management

User-Defined Job Queues and ALTJOB HIPRI Enhancements

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

by Mohan Das Konanoor and Jayaram

Enhancements Summary

Previously MPE/iX had one job queue into which all the submitted jobs went before getting launched by the dispatcher. A few long jobs could prevent many short jobs from running.

MPE/iX can now have up to 255 user-defined job queues, each having a separate limit on the number of jobs that can be run. Users can specify the queue to which their jobs should log on by using the newly added ;JOBQ= parameter of !JOB command or !STREAM command. There will be one default job queue named HPSYSJQ, which will be created during the system bootup.

  • Three new commands have been added: NEWJOBQ, PURGEJOBQ, and LISTJOBQ

  • LIMIT, ALTJOB, JOB and STREAM commands now have a new parameter, ;JOBQ=.

  • LIMIT command can now be used to increment or decrement the limit values.

  • SHOWJOB command now has a new parameter ;JOBQ to display the queue name to which each job belongs.

  • ALTJOB command now has a new option ;HIPRI to change the priority of the job as HIPRI. This option can be used to override the job limit. SM or OP capability is required for this option.

New Commands

NEWJOBQ

Syntax:

NEWJOBQ qname  [;limit=n]

The NEWJOBQ command creates a new job queue. SM/OP capability is required to execute this command.

Limit is the only queue controlling property. The jobs in the queue are sorted by their INPRI. In case of a tie for INPRI, jobs are sorted by their INTRO time.

The global limit takes precedence over individual queue limits. That is, even if a JOBQ has a slot available, if the overall limit has been reached, jobs have to wait until one of the jobs finishes or the global limit is increased. When a global slot becomes available, the next job is picked from among the eligible job queues (those which haven't yet reached their individual limits) using the following algorithm:

  • Across all job queues, the highest INPRI job is selected. In case of a tie for INPRI, the one which was introduced earliest is selected. There cannot be a tie in INTRO time.

The job queues persist across reboots, provided a START RECOVERY is done. Any other system starts will cause the job queues to be deleted and they will have to be created again.

This command is available in a session, job, or in BREAK. Pressing [Break] has no effect on this command. This command is not allowed in SYSSTART.

Parameters:

qname is the name of the queue to be created. Queue names can contain any characters. Queue names can be up to 8 characters in length and longer names will be truncated. If a queue of this name already exists, an error is indicated.

limit is the maximum number of jobs that can be allowed in this queue. The limit value can be changed using the :LIMIT [+-]n;JOBQ= command. If omitted, a value of zero is assumed.

Example:

:NEWJOBQ MYJOBQ;LIMIT=100

PURGEJOBQ

Syntax:

PURGEJOBQ   qname

The PURGEJOBQ command deletes a job queue. The queue will be deleted only if it is empty, that is if no jobs are waiting or executing in the queue. The default system job queue can not be purged. The user must have SM/OP capability to execute the command.

This command is available in a session, job, or in BREAK. Pressing [Break] aborts the execution of this command. This command is not allowed in SYSSTART.

Parameters:

qname is the name of the queue to be deleted.

Example:

:PURGEJOBQ myjobq

LISTJOBQ

Syntax:

LISTJOBQ

The LISTJOBQ command allows the user to list all the existing job queues in the system. It displays the queue name, limit, number of jobs in the queue that are in the EXEC state and the total number jobs in the queue, (Number of jobs in the EXEC state + Number of jobs in the WAIT state). This command is not allowed in SYSSTART.

Example:

:LISTJOBQ

JOBQ LIMIT EXEC TOTAL

HPSYSJQ 3500 1 1
MYJOBQ 100 1 1
MJQ 10 1 2

Modified Commands

LIMIT

Syntax:

LIMIT [[+/-] numjobs],
[[+/-] numsessions
[[;JOBQ=] qname]

The LIMIT command allows users with OP capability to change the job and session limits. As a result of this enhancement, it can be used to change the limit value of individual job queues. The LIMIT command now accepts a new parameter ;JOBQ=. It also accepts + or - before the numeric values to indicate increment or decrement.

Parameters:

qname is the name of the job queue whose limit is to be changed. If the queue name is not specified, LIMIT command will alter the global limit values.

+/- if specified before the numeric value, the corresponding limit value will be incremented/decremented.

Examples:

:LIMIT 60;JOBQ=myjobq   
Set the limit of MYJOBQ to 60
:LIMIT -1;JOBQ=jobq   
Decrement the limit by 1
:LIMIT +1               
Increment the global job limit by 1

JOB

Syntax:

JOB [jobname,]username[/userpass].acctname[/acctpass]
[,groupname[/grouppass] ]

[;TIME=cpusecs] [;PRI={BS
CS
DS
ES}]
[;INPRI=inputpriority
;HIPRI ][;RESTART]

[;OUTCLASS= [ [device] [,[outputpriority][,numcopies] ] ] ]

[;TERM={termtype}] [;PRIVATE] [;SPSAVE] [;JOBQ= qname]

JOB command now accepts a new parameter ;JOBQ=. Users can specify the job queue name into which a particular job should log on. If a job queue is specified in the STREAM command then it overrides the name specified in the JOB command. If no queue name is specified default system job queue is used.

Parameters:

qname is the name of the queue into which the job should log on.

Example:

:JOB foo,manager.sys;JOBQ=myjobq

ALTJOB

Syntax:

ALTJOB [JOB=] {#Jnnn
#Snnn}
[ ;INPRI=inputpriority |
;HIPRI] [ ;OUTDEV={ldev
devclass}]
[;JOBQ=qname]

ALTJOB alters the attributes of waiting or scheduling jobs. ALTJOB now accepts a new parameter ;JOBQ=. Jobs waiting or executing in a queue can moved to other queues. ;HIPRI is used to change the priority of the job as HIPRI. This option can be used to override the job limit. SM or OP capability is required for both JOBQ= and ;HIPRI.

When an executing job is moved, the limit of the target queue is ignored and the job continues to execute in the new queue. A waiting job continues to wait in the new queue if the queue has already reached its limit.

Parameters:

qname is the name of the job queue into which the job is to be moved.

hipri is the name of the option to change the priority of a job.

Example:

:ALTJOB #j324;JOBQ=mjq

STREAM

Syntax:

STREAM [filename] [,char]
[;AT = timespec][;DAY = {day-of-week
day-of-month
days-until-month}]
[;DATE = datespec]
[;IN = [days[,[hours] [,minutes] ] ] ]
[;JOBQ = qname]

STREAM command now accepts a new parameter ;JOBQ= User can specify the queue name into which a particular job should go. The name specified overrides the queue name specified in the JOB command.

Parameters:

qname is the name of the queue into which the job must log on. If no queue name is specified the default system job queue will be used.

Example:

:STREAM FOO; JOBQ= myjobq

SHOWJOB

Syntax:

SHOWJOB [ [#]Snnn
[#]Jnnn
STATUS
SCHED
item[;item[;...] ] ] [;*listfile]
[;JOBQ]

SHOWJOB command displays status information about jobs/sessions. It now accepts a new format parameter ;JOBQ which will indicate the queue name to which the job belongs. A new field JOBQ is added into the SHOWJOB output format. If the ;JOBQ option is not specified the SHOWJOB output will be the same as before.

Example:

:SHOWJOB;JOBQ
New field
~~~~~~~~~
JOBNUM STATE IPRI JLIST JOBQ INTRODUCED JOB NAME

#J3 EXEC LP HPSYSJQ WED 11:46A FTPMON,FTP.SYS
#J7 EXEC LP SYSMGRQ WED 5:47P EMG,MGR.SYSMGR
#S81 EXEC 34 THU 12:17P MGR.GOPI
Feedback to webmaster