1QSELECT(1P) POSIX Programmer's Manual QSELECT(1P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 qselect - select batch jobs
13
15 qselect [-a [op]date_time][-A account_string][-c [op]interval]
16 [-h hold_list][-l resource_list][-N name][-p [op]priority]
17 [-q destination][-r y|n][-s states][-u user_list]
18
20 To select a set of batch jobs is to return the batch job_identifiers
21 for each batch job that meets a list of selection criteria. A set of
22 batch jobs is selected by a request to a batch server. The qselect
23 utility is a user-accessible batch client that requests the selection
24 of batch jobs.
25
26 Upon successful completion, the qselect utility shall have returned a
27 list of zero or more batch job_identifiers that meet the criteria spec‐
28 ified by the options and option-arguments presented to the utility.
29
30 The qselect utility shall select batch jobs by sending a Select Jobs
31 Request to a batch server. The qselect utility shall not exit until the
32 server replies to each request generated.
33
34 For each option presented to the qselect utility, the utility shall
35 restrict the set of selected batch jobs as described in the OPTIONS
36 section.
37
38 The qselect utility shall not restrict selection of batch jobs except
39 by authorization and as required by the options presented to the util‐
40 ity.
41
42 When an option is specified with a mandatory or optional op component
43 to the option-argument, then op shall specify a relation between the
44 value of a certain batch job attribute and the value component of the
45 option-argument. If an op is allowable on an option, then the descrip‐
46 tion of the option letter indicates the op as either mandatory or
47 optional. Acceptable strings for the op component, and the relation the
48 string indicates, are shown in the following list:
49
50 .eq. The value represented by the attribute of the batch job is equal
51 to the value represented by the option-argument.
52
53 .ge. The value represented by the attribute of the batch job is
54 greater than or equal to the value represented by the option-
55 argument.
56
57 .gt. The value represented by the attribute of the batch job is
58 greater than the value represented by the option-argument.
59
60 .lt. The value represented by the attribute of the batch job is less
61 than the value represented by the option-argument.
62
63 .le. The value represented by the attribute of the batch job is less
64 than or equal to the value represented by the option-argument.
65
66 .ne. The value represented by the attribute of the batch job is not
67 equal to the value represented by the option-argument.
68
69
71 The qselect utility shall conform to the Base Definitions volume of
72 IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
73
74 The following options shall be supported by the implementation:
75
76 -a [op]date_time
77
78 Restrict selection to a specific time, or a range of times.
79
80 The qselect utility shall select only batch jobs for which the value of
81 the Execution_Time attribute is related to the Epoch equivalent of the
82 local time expressed by the value of the date_time component of the
83 option-argument in the manner indicated by the value of the op compo‐
84 nent of the option-argument.
85
86 The qselect utility shall accept a date_time component of the option-
87 argument that conforms to the syntax of the time operand of the touch
88 utility.
89
90 If the op component of the option-argument is not presented to the qse‐
91 lect utility, the utility shall select batch jobs for which the Execu‐
92 tion_Time attribute is equal to the date_time component of the option-
93 argument.
94
95 When comparing times, the qselect utility shall use the following defi‐
96 nitions for the op component of the option-argument:
97
98 .eq.
99 The time represented by value of the Execution_Time attribute of
100 the batch job is equal to the time represented by the date_time
101 component of the option-argument.
102
103 .ge.
104 The time represented by value of the Execution_Time attribute of
105 the batch job is after or equal to the time represented by the
106 date_time component of the option-argument.
107
108 .gt.
109 The time represented by value of the Execution_Time attribute of
110 the batch job is after the time represented by the date_time
111 component of the option-argument.
112
113 .lt.
114 The time represented by value of the Execution_Time attribute of
115 the batch job is before the time represented by the date_time
116 component of the option-argument.
117
118 .le.
119 The time represented by value of the Execution_Time attribute of
120 the batch job is before or equal to the time represented by the
121 date_time component of the option-argument.
122
123 .ne.
124 The time represented by value of the Execution_Time attribute of
125 the batch job is not equal to the time represented by the
126 date_time component of the option-argument.
127
128
129 The qselect utility shall accept the defined character strings for the
130 op component of the option-argument.
131
132 -A account_string
133
134 Restrict selection to the batch jobs charging a specified
135 account.
136
137 The qselect utility shall select only batch jobs for which the value of
138 the Account_Name attribute of the batch job matchs the value of the
139 account_string option-argument.
140
141 The syntax of the account_string option-argument is unspecified.
142
143 -c [op]interval
144
145 Restrict selection to batch jobs within a range of checkpoint
146 intervals.
147
148 The qselect utility shall select only batch jobs for which the value of
149 the Checkpoint attribute relates to the value of the interval component
150 of the option-argument in the manner indicated by the value of the op
151 component of the option-argument.
152
153 If the op component of the option-argument is omitted, the qselect
154 utility shall select batch jobs for which the value of the Checkpoint
155 attribute is equal to the value of the interval component of the
156 option-argument.
157
158 When comparing checkpoint intervals, the qselect utility shall use the
159 following definitions for the op component of the option-argument:
160
161 .eq.
162 The value of the Checkpoint attribute of the batch job equals
163 the value of the interval component of the option-argument.
164
165 .ge.
166 The value of the Checkpoint attribute of the batch job is
167 greater than or equal to the value of the interval component
168 option-argument.
169
170 .gt.
171 The value of the Checkpoint attribute of the batch job is
172 greater than the value of the interval component option-argu‐
173 ment.
174
175 .lt.
176 The value of the Checkpoint attribute of the batch job is less
177 than the value of the interval component option-argument.
178
179 .le.
180 The value of the Checkpoint attribute of the batch job is less
181 than or equal to the value of the interval component option-
182 argument.
183
184 .ne.
185 The value of the Checkpoint attribute of the batch job does not
186 equal the value of the interval component option-argument.
187
188
189 The qselect utility shall accept the defined character strings for the
190 op component of the option-argument.
191
192 The ordering relationship for the values of the interval option-argu‐
193 ment is defined to be:
194
195
196 `n' .gt. `s' .gt. `c=minutes' .ge. `c'
197 When comparing Checkpoint attributes with an interval having the value
198 of the single character 'u', only equality or inequality are valid com‐
199 parisons.
200
201 -h hold_list
202 Restrict selection to batch jobs that have a specific type of
203 hold.
204
205 The qselect utility shall select only batch jobs for which the value of
206 the Hold_Types attribute matches the value of the hold_list option-
207 argument.
208
209 The qselect -h option shall accept a value for the hold_list option-
210 argument that is a string of alphanumeric characters in the portable
211 character set (see the Base Definitions volume of IEEE Std 1003.1-2001,
212 Section 6.1, Portable Character Set).
213
214 The qselect utility shall accept a value for the hold_list option-argu‐
215 ment that is a string of one or more of the characters 'u', 's', or
216 'o', or the single character 'n' .
217
218 Each unique character in the hold_list option-argument of the qselect
219 utility is defined as follows, each representing a different hold type:
220
221 u
222 USER
223
224 s
225 SYSTEM
226
227 o
228 OPERATOR
229
230
231 If any of these characters are duplicated in the hold_list option-argu‐
232 ment, the duplicates shall be ignored.
233
234 The qselect utility shall consider it an error if any hold type other
235 than 'n' is combined with hold type 'n' .
236
237 Strictly conforming applications shall not repeat any of the characters
238 'u', 's', 'o', or 'n' within the hold_list option-argument. The qselect
239 utility shall permit the repetition of characters, but shall not assign
240 additional meaning to the repeated characters.
241
242 An implementation may define other hold types. The conformance document
243 for an implementation shall describe any additional hold types, how
244 they are specified, their internal behavior, and how they affect the
245 behavior of the utility.
246
247 -l resource_list
248
249 Restrict selection to batch jobs with specified resource limits
250 and attributes.
251
252 The qselect utility shall accept a resource_list option-argument with
253 the following syntax:
254
255
256 resource_name op value [,,resource_name op value,, ...]
257
258 When comparing resource values, the qselect utility shall use the fol‐
259 lowing definitions for the op component of the option-argument:
260
261 .eq.
262 The value of the resource of the same name in the Resource_List
263 attribute of the batch job equals the value of the value compo‐
264 nent of the option-argument.
265
266 .ge.
267 The value of the resource of the same name in the Resource_List
268 attribute of the batch job is greater than or equal to the value
269 of the value component of the option-argument.
270
271 .gt.
272 The value of the resource of the same name in the Resource_List
273 attribute of the batch job is greater than the value of the
274 value component of the option-argument.
275
276 .lt.
277 The value of the resource of the same name in the Resource_List
278 attribute of the batch job is less than the value of the value
279 component of the option-argument.
280
281 .ne.
282 The value of the resource of the same name in the Resource_List
283 attribute of the batch job does not equal the value of the value
284 component of the option-argument.
285
286 .le.
287 The value of the resource of the same name in the Resource_List
288 attribute of the batch job is less than or equal to the value of
289 the value component of the option-argument.
290
291
292 When comparing the limit of a Resource_List attribute with the value
293 component of the option-argument, if the limit, the value, or both are
294 non-numeric, only equality or inequality are valid comparisons.
295
296 The qselect utility shall select only batch jobs for which the values
297 of the resource_names listed in the resource_list option-argument match
298 the corresponding limits of the Resource_List attribute of the batch
299 job.
300
301 Limits of resource_names present in the Resource_List attribute of the
302 batch job that have no corresponding values in the resource_list
303 option-argument shall not be considered when selecting batch jobs.
304
305 -N name
306 Restrict selection to batch jobs with a specified name.
307
308 The qselect utility shall select only batch jobs for which the value of
309 the Job_Name attribute matches the value of the name option-argument.
310 The string specified in the name option-argument shall be passed, unin‐
311 terpreted, to the server. This allows an implementation to match "wild‐
312 card" patterns against batch job names.
313
314 An implementation shall describe in the conformance document the format
315 it supports for matching against the Job_Name attribute.
316
317 -p [op]priority
318
319 Restrict selection to batch jobs of the specified priority or
320 range of priorities.
321
322 The qselect utility shall select only batch jobs for which the value of
323 the Priority attribute of the batch job relates to the value of the
324 priority component of the option-argument in the manner indicated by
325 the value of the op component of the option-argument.
326
327 If the op component of the option-argument is omitted, the qselect
328 utility shall select batch jobs for which the value of the Priority
329 attribute of the batch job is equal to the value of the priority compo‐
330 nent of the option-argument.
331
332 When comparing priority values, the qselect utility shall use the fol‐
333 lowing definitions for the op component of the option-argument:
334
335 .eq.
336 The value of the Priority attribute of the batch job equals the
337 value of the priority component of the option-argument.
338
339 .ge.
340 The value of the Priority attribute of the batch job is greater
341 than or equal to the value of the priority component option-
342 argument.
343
344 .gt.
345 The value of the Priority attribute of the batch job is greater
346 than the value of the priority component option-argument.
347
348 .lt.
349 The value of the Priority attribute of the batch job is less
350 than the value of the priority component option-argument.
351
352 .lt.
353 The value of the Priority attribute of the batch job is less
354 than or equal to the value of the priority component option-
355 argument.
356
357 .ne.
358 The value of the Priority attribute of the batch job does not
359 equal the value of the priority component option-argument.
360
361
362 -q destination
363
364 Restrict selection to the specified batch queue or server, or
365 both.
366
367 The qselect utility shall select only batch jobs that are located at
368 the destination indicated by the value of the destination option-argu‐
369 ment.
370
371 The destination defines a batch queue, a server, or a batch queue at a
372 server.
373
374 The qselect utility shall accept an option-argument for the -q option
375 that conforms to the syntax for a destination. If the -q option is not
376 presented to the qselect utility, the utility shall select batch jobs
377 from all batch queues at the default batch server.
378
379 If the option-argument describes only a batch queue, the qselect util‐
380 ity shall select only batch jobs from the batch queue of the specified
381 name at the default batch server. The means by which qselect determines
382 the default server is implementation-defined.
383
384 If the option-argument describes only a batch server, the qselect util‐
385 ity shall select batch jobs from all the batch queues at that batch
386 server.
387
388 If the option-argument describes both a batch queue and a batch server,
389 the qselect utility shall select only batch jobs from the specified
390 batch queue at the specified server.
391
392 -r y|n
393 Restrict selection to batch jobs with the specified rerunability
394 status.
395
396 The qselect utility shall select only batch jobs for which the value of
397 the Rerunable attribute of the batch job matches the value of the
398 option-argument.
399
400 The qselect utility shall accept a value for the option-argument that
401 consists of either the single character 'y' or the single character 'n'
402 . The character 'y' represents the value TRUE, and the character 'n'
403 represents the value FALSE.
404
405 -s states
406 Restrict selection to batch jobs in the specified states.
407
408 The qselect utility shall accept an option-argument that consists of
409 any combination of the characters 'e', 'q', 'r', 'w', 'h', and 't' .
410
411 Conforming applications shall not repeat any character in the option-
412 argument. The qselect utility shall permit the repetition of charac‐
413 ters in the option-argument, but shall not assign additional meaning to
414 repeated characters.
415
416 The qselect utility shall interpret the characters in the states
417 option-argument as follows:
418
419 e
420 Represents the EXITING state.
421
422 q
423 Represents the QUEUED state.
424
425 r
426 Represents the RUNNING state.
427
428 t
429 Represents the TRANSITING state.
430
431 h
432 Represents the HELD state.
433
434 w
435 Represents the WAITING state.
436
437
438 For each character in the states option-argument, the qselect utility
439 shall select batch jobs in the corresponding state.
440
441 -u user_list
442 Restrict selection to batch jobs owned by the specified user
443 names.
444
445 The qselect utility shall select only the batch jobs of those users
446 specified in the user_list option-argument.
447
448 The qselect utility shall accept a user_list option-argument that con‐
449 forms to the following syntax:
450
451
452 username[@host][,,username[@host],, ...]
453
454 The qselect utility shall accept only one user name that is missing a
455 corresponding host name. The qselect utility shall accept only one user
456 name per named host.
457
458
460 None.
461
463 Not used.
464
466 None.
467
469 The following environment variables shall affect the execution of qse‐
470 lect:
471
472 LANG Provide a default value for the internationalization variables
473 that are unset or null. (See the Base Definitions volume of
474 IEEE Std 1003.1-2001, Section 8.2, Internationalization Vari‐
475 ables for the precedence of internationalization variables used
476 to determine the values of locale categories.)
477
478 LC_ALL If set to a non-empty string value, override the values of all
479 the other internationalization variables.
480
481 LC_CTYPE
482 Determine the locale for the interpretation of sequences of
483 bytes of text data as characters (for example, single-byte as
484 opposed to multi-byte characters in arguments).
485
486 LC_MESSAGES
487 Determine the locale that should be used to affect the format
488 and contents of diagnostic messages written to standard error.
489
490 LOGNAME
491 Determine the login name of the user.
492
493 TZ Determine the timezone used to interpret the date-time option-
494 argument. If TZ is unset or null, an unspecified default time‐
495 zone shall be used.
496
497
499 Default.
500
502 The qselect utility shall write zero or more batch job_identifiers to
503 standard output.
504
505 The qselect utility shall separate the batch job_identifiers written to
506 standard output by white space.
507
508 The qselect utility shall write batch job_identifiers in the following
509 format:
510
511
512 sequence_number.server_name@server
513
515 The standard error shall be used only for diagnostic messages.
516
518 None.
519
521 None.
522
524 The following exit values shall be returned:
525
526 0 Successful completion.
527
528 >0 An error occurred.
529
530
532 Default.
533
534 The following sections are informative.
535
537 None.
538
540 The following example shows how a user might use the qselect utility in
541 conjunction with the qdel utility to delete all of his or her jobs in
542 the queued state without affecting any jobs that are already running:
543
544
545 qdel $(qselect -s q)
546
547 or:
548
549
550 qselect -s q || xargs qdel
551
553 The qselect utility allows users to acquire a list of job identifiers
554 that match user-specified selection criteria. The list of identifiers
555 returned by the qselect utility conforms to the syntax of the batch job
556 identifier list processed by a utility such as qmove, qdel, and qrls.
557 The qselect utility is thus a powerful tool for causing another batch
558 system utility to act upon a set of jobs that match a list of selection
559 criteria.
560
561 The options of the qselect utility let the user apply a number of use‐
562 ful filters for selecting jobs. Each option further restricts the
563 selection of jobs. Many of the selection options allow the specifica‐
564 tion of a relational operator. The FORTRAN-like syntax of the operator-
565 that is, ".lt." - was chosen rather than the C-like "<=" meta-charac‐
566 ters.
567
568 The -a option allows users to restrict the selected jobs to those that
569 have been submitted (or altered) to wait until a particular time. The
570 time period is determined by the argument of this option, which
571 includes both a time and an operator-it is thus possible to select jobs
572 waiting until a specific time, jobs waiting until after a certain time,
573 or those waiting for a time before the specified time.
574
575 The -A option allows users to restrict the selected jobs to those that
576 have been submitted (or altered) to charge a particular account.
577
578 The -c option allows users to restrict the selected jobs to those whose
579 checkpointing interval falls within the specified range.
580
581 The -l option allows users to select those jobs whose resource limits
582 fall within the range indicated by the value of the option. For exam‐
583 ple, a user could select those jobs for which the CPU time limit is
584 greater than two hours.
585
586 The -N option allows users to select jobs by job name. For instance,
587 all the parts of a task that have been divided in parallel jobs might
588 be given the same name, and thus manipulated as a group by means of
589 this option.
590
591 The -q option allows users to select jobs in a specified queue.
592
593 The -r option allows users to select only those jobs with a specified
594 rerun criteria. For instance, a user might select only those jobs that
595 can be rerun for use with the qrerun utility.
596
597 The -s option allows users to select only those jobs that are in a cer‐
598 tain state.
599
600 The -u option allows users to select jobs that have been submitted to
601 execute under a particular account.
602
603 The selection criteria provided by the options of the qselect utility
604 allow users to select jobs based on all the appropriate attributes that
605 can be assigned to jobs by the qsub utility.
606
607 Historically, the qselect utility has not been a part of existing prac‐
608 tice; it is an improvement that has been introduced in this volume of
609 IEEE Std 1003.1-2001.
610
612 None.
613
615 qdel, qrerun, qrls, qselect, qsub, touch, Batch Environment Services
616
618 Portions of this text are reprinted and reproduced in electronic form
619 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
620 -- Portable Operating System Interface (POSIX), The Open Group Base
621 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
622 Electrical and Electronics Engineers, Inc and The Open Group. In the
623 event of any discrepancy between this version and the original IEEE and
624 The Open Group Standard, the original IEEE and The Open Group Standard
625 is the referee document. The original Standard can be obtained online
626 at http://www.opengroup.org/unix/online.html .
627
628
629
630IEEE/The Open Group 2003 QSELECT(1P)