Message-ID: <1530472063.8473.1711666071537.JavaMail.confluence@host3.pipelinefx.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8472_1083990852.1711666071536" ------=_Part_8472_1083990852.1711666071536 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Qube! allows the use of wildcard patterns and regular expressions (regex= ) to perform string matching in many text/string parameters that are used a= s filters.
For example, with the qbjobs comman= d, you can filter jobs based on the job's name, user, cluster, group, etc.,= using wildcards or regular expressions.
Wildcards and Regular Expressions are not only supported by command line= tools, but also by API routines.
Some commands, namely qbjobs and qbhos= ts, also support general expressions to filter jobs and hosts, respecti= vely.
Starting a filtering parameter with either "*" or "%"= ; indicates that you're using wildcards. In the string, you can use &= quot;%" to match any number of chars, and "_" to match a sin= gle char.
qbjobs -name "*testjob%" # list all of my jobs wit=
h a job name that starts with "testjob"
qbjobs -name "%maya%" # list all of my jobs with= a job name that starts with "maya", like "maya render mysce= ne.ma", or "mayabatch"
qbjobs -name "%%maya%" # list all of my job=
s with a job name that includes "maya" anywhere, like "mymay=
ajob", or "not a maya job"
qbkill -cluster "%/proj_" 0 # kill all jobs that w=
ere submitted to clusters that are like /projA, /projX, /proj1, ...
<=
/p>
qbhosts -group "%rendserv%" # list all host=
s that belong to a group with a name that starts with "rendserv"<=
/code>
Note that the qbjobs command only displays your own jobs by default, unl= ess you use the special wildcard "all" in the "-user" f= ield, used as in:
qbjobs -u all
Starting a filtering parameter with "~" (tilde) tells the syst= em that you're using a regular expression. Perl-style regex (or Perl Compat= ible Regex, PCRE) is supported (but without the \s,\S,\d an \D short c= uts).
For example:
[0-9] =3D all numbers 0 to 9
&= nbsp; [abc] =3D either a, b or c
&n= bsp; + =3D requires at least 1
&nbs= p; * =3D 0 or more characters
 = ; ? =3D requires 1
^ =3D beg= inning of line
$ =3D end of line
() =3D logical group
&nbs= p; | =3D or
qbjobs -u "~^fred"
qbjobs -type '~^cmd(range|line)$' =
-name "~^maya.*"
qbhosts -cluster "~^/proj."
The qbjobs and qbhosts commands support filtering by expressions. More s= pecifically, qbjobs supports expressions in its "-expression" opt= ion, while qbhosts supports it in its "-resources" option.
Expressions are detailed in the "Job Requirements" page, but here are some examples.
qbjobs -expression "id >=3D 1000 && i=
d <=3D 2000" # list all my jobs with job ID between 10=
00 and 2000, inclusive
qbjobs -expr "priority <=
=3D 100 && (status=3Dfailed || status=3Dkilled)" # list =
all my jobs with priority 100 or higher, that failed or were killed<=
/code>
qbhosts -resource "host.processor_speed > 4000"  =
; # list all hosts faster than 4000 Hz
qbhost=
s -resource "host.memory.avail >=3D 4000" # list =
all hosts with available memory of at least 4000 MB
PCRE (Perl-compatible Regular Expressions) documentatio= n at http://www.pcre.org/original/doc/html/
= li>