qselect.1B 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. .\" Copyright (C) 1994-2018 Altair Engineering, Inc.
  2. .\" For more information, contact Altair at www.altair.com.
  3. .\"
  4. .\" This file is part of the PBS Professional ("PBS Pro") software.
  5. .\"
  6. .\" Open Source License Information:
  7. .\"
  8. .\" PBS Pro is free software. You can redistribute it and/or modify it under the
  9. .\" terms of the GNU Affero General Public License as published by the Free
  10. .\" Software Foundation, either version 3 of the License, or (at your option) any
  11. .\" later version.
  12. .\"
  13. .\" PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
  14. .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  15. .\" FOR A PARTICULAR PURPOSE.
  16. .\" See the GNU Affero General Public License for more details.
  17. .\"
  18. .\" You should have received a copy of the GNU Affero General Public License
  19. .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. .\"
  21. .\" Commercial License Information:
  22. .\"
  23. .\" For a copy of the commercial license terms and conditions,
  24. .\" go to: (http://www.pbspro.com/UserArea/agreement.html)
  25. .\" or contact the Altair Legal Department.
  26. .\"
  27. .\" Altair’s dual-license business model allows companies, individuals, and
  28. .\" organizations to create proprietary derivative works of PBS Pro and
  29. .\" distribute them - whether embedded or bundled with other software -
  30. .\" under a commercial license agreement.
  31. .\"
  32. .\" Use of Altair’s trademarks, including but not limited to "PBS™",
  33. .\" "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
  34. .\" trademark licensing policies.
  35. .\"
  36. .TH qselect 1B "11 January 2018" Local "PBS Professional"
  37. .SH NAME
  38. .B qselect
  39. - select specified PBS jobs
  40. .SH SYNOPSIS
  41. .B qselect
  42. [-a [<op>] <date and time>] [-A <account string>]
  43. .RS 8
  44. [-c [<op>] <interval>] [-h <hold list>] [-H] [-J]
  45. .br
  46. [-l <resource list>] [-N <name>] [-p [<op>] <priority>]
  47. .br
  48. [-P <project>] [-q <destination>] [-r <rerun>] [-s <states>]
  49. .br
  50. [-t <time option> [<comparison>] <specified time>] [-T]
  51. .br
  52. [-u <user list>] [-x]
  53. .RE
  54. .br
  55. .B qselect
  56. --version
  57. .SH DESCRIPTION
  58. The
  59. .B qselect
  60. command lists those jobs that meet the specified selection criteria.
  61. You can compare certain job attribute values to specified values using
  62. a comparison operator shown as
  63. .I op
  64. in the option description.
  65. You can select jobs, job arrays, or subjobs. You can select jobs from
  66. one server per call to the command.
  67. Each option acts as a filter restricting which jobs are listed.
  68. You can select jobs according to the values of some of the resources
  69. in the
  70. .I Resource_List
  71. job attribute. You can also select jobs
  72. according the selection directive (although because this is a string,
  73. you can only check for equality or inequality.)
  74. Jobs that are finished or moved are listed only when the
  75. .I -x
  76. or
  77. .I -H
  78. options are used. Otherwise, job selection is limited to queued and
  79. running jobs.
  80. .B Comparison Operations
  81. .br
  82. You can select jobs by comparing the values of certain job attributes
  83. to values you specify. The following table lists the comparison
  84. operations you can use:
  85. .B Operation \ \ Type of Comparison
  86. .br
  87. -----------------------------------------------------------------------
  88. .IP .eq. 12
  89. The value of the attribute of the job is equal to the value of the
  90. option argument.
  91. .IP .ne. 12
  92. The value of the attribute of the job is not equal to the value of the
  93. option argument.
  94. .IP .ge. 12
  95. The value of the attribute of the job is greater than or equal to the
  96. value of the option argument.
  97. .IP .gt. 12
  98. The value of the attribute of the job is greater than the value of the
  99. option argument.
  100. .IP .le. 12
  101. The value of the attribute of the job is less than or equal to the
  102. value of the option argument.
  103. .IP .lt. 12
  104. The value of the attribute of the job is less than the
  105. value of the option argument.
  106. .LP
  107. For example, to select jobs whose
  108. .I Priority
  109. attribute has a value greater than
  110. .I 5:
  111. .br
  112. .B \ \ \ qselect -p.gt.5
  113. Where an optional comparison is not specified, the comparison
  114. operation defaults to
  115. .I .eq,
  116. meaning PBS checks whether the value of the
  117. attribute is equal to the option argument.
  118. .B Required Permissions
  119. .br
  120. When selecting jobs according to resource values, users without
  121. Operator or Manager privilege cannot specify custom resources which
  122. were created to be invisible to unprivileged users.
  123. .SH Options to qselect
  124. .IP "(no options)" 8
  125. Lists all jobs at the server which the user is authorized to list
  126. (query status of).
  127. .IP "-a [<op>] <date and time>" 8
  128. .B Deprecated.
  129. Restricts selection to those jobs whose
  130. .I Execution_Time
  131. attribute qualifies when compared to the
  132. .I date and time
  133. argument. You can select a range of execution times by using this
  134. option twice, to compare to a minimum time and a maximum time.
  135. The
  136. .I date and time
  137. argument has the format:
  138. .br
  139. .I [[CC]YY]MMDDhhmm[.SS]
  140. .br
  141. where the
  142. .I MM
  143. is the two digits for the month,
  144. .I DD
  145. is the day of the month,
  146. .I hh
  147. is the hour,
  148. .I mm
  149. is the minute, and the optional
  150. .I SS
  151. is the seconds.
  152. .I CC
  153. is the century and
  154. .I YY
  155. the year.
  156. .IP "-A <account string>" 8
  157. Restricts selection to jobs whose
  158. .I Account_Name
  159. attribute matches the specified
  160. .I account string.
  161. .IP "-c [<op>] <interval>" 8
  162. Restricts selection to jobs whose
  163. .I Checkpoint
  164. interval attribute meets the comparison criteria.
  165. The
  166. .I interval
  167. argument can take one of the following values:
  168. .RS 11
  169. .I c
  170. .br
  171. .I c=<minutes>
  172. .br
  173. .I n
  174. .br
  175. .I s
  176. .br
  177. .I w
  178. .br
  179. .I w=<minutes>
  180. .RE
  181. .IP " " 8
  182. We give the range of interval values for the
  183. .I Checkpoint
  184. attribute the following ordered relationship:
  185. .br
  186. .I n\ >\ s\ >\ c=minutes\ >\ c\ >\ u
  187. (Information about
  188. .I w
  189. and
  190. .I w=<minutes>
  191. is not available.)
  192. For an interval value of
  193. "u", only ".eq" and ".ne" are valid.
  194. .IP "-h <hold list>" 8
  195. Restricts the selection of jobs to those with a specific set of hold types.
  196. The holds in the
  197. .I Hold_Types
  198. job attribute must be the same as those in the
  199. .I hold list
  200. argument, but can be in a different order.
  201. The
  202. .I hold list
  203. argument is a string consisting of the single letter
  204. .I n,
  205. or one or more of the letters
  206. .I u,
  207. .I o,
  208. .I p,
  209. or
  210. .I s
  211. in any combination. If letters are duplicated, they are treated as if they
  212. occurred once.
  213. The letters represent the hold types:
  214. .B Letter \ \ Hold Type
  215. .br
  216. ---------------------------------------------------------------
  217. .nf
  218. n None
  219. u User
  220. o Other
  221. p Bad password
  222. s System
  223. .fi
  224. .IP "-H" 8
  225. Restricts selection to finished and moved jobs.
  226. .IP "-J" 8
  227. Limits selection to job arrays only.
  228. .IP "-l <resource list>" 8
  229. Restricts selection of jobs to those with specified resource amounts.
  230. Resource must be job-wide, or be
  231. .I mem, ncpus,
  232. or
  233. .I vmem.
  234. The
  235. .I resource list
  236. is in the following format:
  237. .br
  238. .I <resource name> <op> <value>[,<resource name> <op> <value> ...]
  239. You must specify
  240. .I op,
  241. and you can use any of the comparison operators.
  242. Because resource specifications for chunks using the select statement,
  243. and placement using the place statement, are stored as strings, the
  244. only useful operators for these are
  245. .I .eq.
  246. and
  247. .I .ne.
  248. Unprivileged users cannot specify custom resources
  249. which were created to be invisible to unprivileged users.
  250. .IP "-N <name>" 8
  251. Restricts selection of jobs to those with the specified value for the
  252. .I Job_Name
  253. attribute.
  254. .IP "-p [<op>] <priority>" 8
  255. Restricts selection of jobs to those with the specified
  256. .I Priority
  257. value(s).
  258. .IP "-P <project>" 8
  259. Restricts selection of jobs to those matching the specified value for the
  260. .I project
  261. attribute.
  262. Format:
  263. .I Project Name;
  264. see the
  265. .I PBS Professional Reference Guide.
  266. .IP "-q <destination>" 8
  267. Restricts selection to those jobs at the specified
  268. .I destination.
  269. The
  270. .I destination
  271. may take of one of the following forms:
  272. .RS 11
  273. .I <queue name>
  274. .br
  275. Restricts selection to the specified queue at the default server.
  276. .br
  277. .I @<server name>
  278. .br
  279. Restricts selection to the specified server.
  280. .br
  281. .I <queue name>@<server name>
  282. .br
  283. Restricts selection to the specified queue at the specified server.
  284. .RE
  285. .IP " " 8
  286. If the -q option is not specified, jobs are selected from the default server.
  287. .IP "-r <rerun>" 8
  288. Restricts selection of jobs to those with the specified value for the
  289. .I Rerunable
  290. attribute. The option argument
  291. .I rerun
  292. must be a single character, either
  293. .I y
  294. or
  295. .I n.
  296. .IP "-s <states>" 8
  297. Restricts job selection to those whose
  298. .I job_state
  299. attribute has the specified value(s).
  300. The
  301. .I states
  302. argument is a character string consisting of any combination of these
  303. characters:
  304. .I B
  305. ,
  306. .I E
  307. ,
  308. .I F
  309. ,
  310. .I H
  311. ,
  312. .I M
  313. ,
  314. .I Q
  315. ,
  316. .I R
  317. ,
  318. .I S
  319. ,
  320. .I T
  321. ,
  322. .I U
  323. ,
  324. .I W
  325. , and
  326. .I X.
  327. (A repeated character is accepted, but no additional meaning is
  328. assigned to it.)
  329. .nf
  330. .B State \ \ Meaning
  331. ---------------------------------------------------------------
  332. B Job array has started execution
  333. E The Exiting state
  334. F The Finished state
  335. H The Held state
  336. M The Moved state
  337. Q The Queued state
  338. R The Running state
  339. S The Suspended state
  340. T The Transiting state
  341. U Job suspended due to workstation user activity
  342. W The Waiting state
  343. X The eXited state. Subjobs only
  344. .fi
  345. .IP
  346. Jobs in any of the specified states are selected.
  347. Job arrays are never in states
  348. .I R, S, T,
  349. or
  350. .I U.
  351. Subjobs may be in those states.
  352. .IP "-t <time option> [<op>] <specified time>" 8
  353. Jobs are selected according to one of their time-based attributes. The
  354. .I time option
  355. specifies which time-based attribute is tested. You give the
  356. .I specified time
  357. in
  358. .I datetime
  359. format. See the
  360. .I PBS Professional Reference Guide.
  361. The
  362. .I time option
  363. is one of the following:
  364. .nf
  365. .B Time
  366. .B Option \ Time Attribute \ Attribute Description
  367. ---------------------------------------------------------------
  368. a Execution_Time Timestamp. Time the job is eligible
  369. for execution. Specified in datetime
  370. format.
  371. c ctime Timestamp; time at which the job was
  372. created. Printed by qstat in
  373. human-readable format. Output in hooks
  374. as seconds since epoch.
  375. e etime Timestamp; time when job became
  376. eligible to run, i.e. was enqueued in
  377. an execution queue and was in the "Q"
  378. state. Reset when a job moves queues,
  379. or is held then released. Not affected
  380. by qaltering. Printed by qstat in
  381. human-readable format. Output in hooks
  382. as seconds since epoch.
  383. g eligible_time Amount of eligible time job accrued
  384. waiting to run. Specified as duration.
  385. m mtime Timestamp; the time that the job was
  386. last modified, changed state, or
  387. changed locations. Printed by qstat in
  388. human-readable format. Output in hooks
  389. as seconds since epoch.
  390. q qtime Timestamp; the time that the job
  391. entered the current queue. Printed by
  392. qstat in human-readable format. Output
  393. in hooks as seconds since epoch.
  394. s stime Timestamp; time the job started.
  395. Updated when job is restarted. Printed
  396. by qstat in human-readable format.
  397. Output in hooks as seconds since epoch.
  398. t estimated. Job's estimated start time. Specified
  399. start_time in datetime format. Printed by qstat in
  400. human-readable format. Output in hooks
  401. as seconds since epoch.
  402. .fi
  403. To bracket a time period, use the
  404. .I -t
  405. option twice.
  406. .br
  407. For example, to select jobs using
  408. .I stime
  409. between noon and 3 p.m.:
  410. .br
  411. .B \ \ \ qselect -ts.gt.09251200 -ts.lt.09251500
  412. .IP "-T" 8
  413. Limits selection to jobs and subjobs.
  414. .IP "-u <user list>" 8
  415. Restricts selection to jobs owned by the specified usernames.
  416. Syntax of
  417. .I user_list:
  418. .br
  419. .I <username>[@<hostname>][,<username>[@<hostname>],...]
  420. Selects jobs which are owned by the listed users at the corresponding hosts.
  421. Hostnames may be wildcarded on the left end, e.g. "*.nasa.gov". A username
  422. without a "@<hostname>" is equivalent to "<username>@*", meaning that it is
  423. valid at any host.
  424. .IP "-x" 8
  425. Selects finished and moved jobs in addition to queued and running jobs.
  426. .IP "-X" 8
  427. Selects completed or deleted subjobs (subjobs in
  428. .I X
  429. state).
  430. .IP "--version" 8
  431. The
  432. .B qselect
  433. command returns its PBS version information and exits.
  434. This option can only be used alone.
  435. .SH STANDARD OUTPUT
  436. PBS writes a list of the selected job IDs to standard output. Each
  437. job ID is separated by white space. A job ID can represent a job, a
  438. job array, or a subjob. Each job ID has one of the forms:
  439. .br
  440. .I <sequence number>.<server name>[@<server name>]
  441. .br
  442. .I <sequence number>[].<server name>[@<server name>]
  443. .br
  444. .I <sequence number>[<index>].<server name>[@<server name>]
  445. .br
  446. .I @<server name>
  447. identifies the server which currently owns the job.
  448. .SH STANDARD ERROR
  449. The
  450. .B qselect
  451. command writes a diagnostic message to standard error for
  452. each error occurrence.
  453. .SH EXIT STATUS
  454. .IP Zero 8
  455. Upon successful processing of all options presented to the
  456. .B qselect
  457. command
  458. .IP "Greater than zero" 8
  459. If the
  460. .B qselect
  461. command fails to process any option
  462. .SH SEE ALSO
  463. The
  464. .I PBS Professional User's Guide,
  465. the
  466. .I PBS Professional Administrator's Guide,
  467. .br
  468. qstat(1B),
  469. qsub(1B),
  470. pbs_job_attributes(7B),
  471. pbs_resources(7B)