Searching for jobs

4 minute read

If you know the job ID that you want to find:

  1. Click Tools > Find job by ID….

  2. Enter the job ID.

  3. Click OK.

    If you do not know the job ID, you can search for jobs using several criteria. Follow these steps:

  4. Click Tools > Search jobs….

  5. Type in the strings you want to find (example, gcc conflict ). You can also constrain your search by searching for specific values in specific fields.

  6. Click Search.

    The values come from fields in the build annotation file.

  7. (Optional) Sort your results by choosing an option from the Sort by drop-down menu.

  8. Double-click a row to display a job’s Job Details dialog box.

  9. In the dialog box’s lower-right corner, click Go to graph.

    The job is now highlighted in the Agents & Jobs section.

  10. In the dialog box’s lower-right corner, click Go to log.

    The job appears in the Build Log window.

Supported search terms

The following fields are supported:

  • name:<job_name> —name of a job is the name of the target that created it. Continuation and parser jobs do not have names.

  • commands:<terms> —search makefile command lines and output. Globbing patterns are supported (for example, commands:gcc foo ).

  • status:<status> —possible values include:

  • normal —a successful job

  • conflict —a job involved in a conflict. Many of these jobs or jobs on which they rely are reverted. Typically, conflicts occur when there is no history file—when the environment does not provide Electric Make with enough information to predict all job dependencies.

  • rerun —some reverted jobs must be run with correct file system context. Rerun jobs are always serialized to guarantee correct context.

  • reverted —a job is reverted when Electric Make serializes job results and the job in question was executed before a (logically) preceding job that failed. The preceding job might have failed because of a conflict. Reverting a job restores the Agent’s file system to the state before the job was run.

  • skipped —skipped jobs are the same as reverted jobs except the skipped job did not run before the preceding job failed.

  • type:<job_type> —possible values include:

  • continuation —a continuation job occurs when commands associated with a makefile target include a submake (also called recursive make). Typically, these submake commands begin with $(MAKE). The commands below a submake, down to and including the next submake command (for the same target), comprise a continuation job. For a target, there are as many continuation jobs as there are submakes with commands after them.

    all:echo abc$(MAKE) abcecho defecho ghi$(MAKE) ghiecho jkl$(MAKE) jkl

    In this example, the first continuation job starts with echo def and ends with $(MAKE) ghi. The second and last continuation job consists of two commands involving jkl.

  • end —cleanup tasks that occur at the end of makefiles (for example, removing intermediate files).

  • exist —jobs corresponding to top-level targets without rules. Electric Make verifies the target exists.

  • follow —one of these jobs follows every submake to handle submake output and exit status for the parent.

  • parse —jobs that parse makefiles.

  • remake —jobs that remake makefiles (only for GNU make).

  • rule —lists jobs corresponding to makefile rules. Sorting results by name lets you find the job that executed a specific rule. If you have several rules (in different makefiles) with the same name, you can display several Job Details dialogs at once.

  • make —ID of the makefile that created the job. The top-level makefile has ID 0 (zero). For example, make:0 returns a list of jobs created directly from the top-level makefile.

  • job:<job_ID> —the job ID, for example, job:J01b11200

  • neededby:<job_ID> —the job in question is needed by another job. Specify the job ID of the job that needs the job in question, for example, neededby:J01b11200. This is useful for tracking inter-job dependencies.

  • length:[relation]<seconds> —job length, in seconds. If you specify length:12.34, you find jobs that lasted exactly 12.34 seconds only. You can also search using length:>12.34, length:>=12.34, length:==12.34, length:<12.34, and length:⇐12.34. To find jobs that lasted 10-15 seconds, specify length:>=10.0 length:⇐15.0.

  • exitcode:[relation]<exit_code> —the job exit code. To find jobs with a non-zero exit code use exitcode:!=0. In general, use arithmetic relations ( =, >, <, >=, or ) to search numerical values and use no relation symbols when searching for string values.

  • waitingJobs:<job_ID> —to find prerequisite jobs of <job_ID>.

  • start:[relation]<seconds> —job start time (in seconds) after the build start time. To find other jobs that started in the first minute of the job, use start:<60. To find jobs that took more than 60 seconds and started during the 10th minute into the build, type length:>60 start:>=600 start:<660.

  • finish:<seconds> —job end time (in seconds) after the build start time.

  • restarts:<number> —jobs that restarted a specified number of times. Jobs are restarted because of cluster sharing and agent failure.

  • jobcache:<type_or_status> —jobs by job cache type or status. Possible values include

  • hit —jobs for which eMake had a cache hit.

  • miss —jobs for which eMake had a cache miss.

  • newslot —jobs for which eMake created a new cache slot. The object files that were previously cached were from compilations that used different command-line arguments, environment variables, or working directories, or any combination of these.

  • uncacheable —jobs for which something went wrong with updating the relevant cache slot.

  • rootschanged —jobs for which there is no natural mapping from the old eMake roots to the new eMake roots.

  • parse —jobs with job cache type parse.

  • gcc —jobs with job cache type gcc.

  • class:<class> —jobs by class name.

  • codegen

  • compile

  • conflict

  • end

  • exist

  • follow

  • library

  • link

  • misc

  • noop

  • packaging

  • parse

  • remake

  • statcache

  • unknown

You can restrict the search scope for the following fields only: type, status, name, make, and job.

Search examples

To find rule jobs involved in conflicts:

rule conflict

or

type:rule status:conflict

To find conflicts involving jobs named “export”:

conflict name:export

To find rerun jobs with names including “port”:

rerun name:*port*

To find non-reverted jobs with names ending in “Makefile”:

!reverted name:*Makefile

To find jobs for the parse type of job caching:

jobcache:parse

(For the JobCache feature) To find jobs for the gcc type of job caching:

jobcache:gcc

To find jobs that had a job cache hit:

jobcache:hit

To combine searches to find jobs that used the gcc job cache type and had a job cache miss:

jobcache:gcc jobcache:miss

The JobCache feature lets a build avoid recompiling object files that it previously built, if their inputs have not changed. For details about this feature, see Job Caching.

To find jobs that are part of a given job (such as the continuation jobs that are logically part of an original rule job):

partof:<job_ID>