]> mj.ucw.cz Git - bex.git/blob - NOTES
Keep history of completed jobs
[bex.git] / NOTES
1 ### Structure of queue directories ###
2
3 <queue>/hosts/<hostname>/       Jobs queued for the given host
4                                 (they are executed in the lexicographic order of <job-id>s)
5         /<job-id>.job           Symlink to <queue>/jobs/<job-id>.job
6         /<job-id>.stat          (Optional) status of the job
7         /<job-id>.tmp           Used temporarily by brun to store the script actually
8                                 sent to the host (can be inspected if something goes wrong)
9         /<job-id>.log           (Optional) transcript of output produced by the job (including
10                                 previous failed attempts)
11
12 <queue>/jobs/<job-id>.job       All jobs issued on this queue, including those which
13                                 are no longer queued for any machine
14
15 <queue>/history/<hostname>/     Successfully completed jobs (their .job, .stat and .log files)
16                                 are moved here if the keep_history config switch is set.
17
18 <queue>/log                     Log of actions on this queue. Lines look this way:
19                                 YYYY-MM-DD HH:MM:SS <host> <job-id> <status> [<msg>]
20                                 <status> and <msg> correspond to "Status" and "Message"
21                                 in status files.
22
23 <queue>/status-fifo             FIFO used for reporting status of subprocesses by `bprun'
24
25 ### Job files ###
26
27 Mail-like structure. First come the headers (<keyword>:<spaces><value>), keywords are
28 case-sensitive, no multi-line fields allowed, then an empty line and then the body
29 (i.e., commands to be executed on the remote host).
30
31 Known header fields:
32
33 ID: <job-id>                    Identifier of the job, unique in the scope of a queue
34 Subject: <subject>              Subject to be displayed to the user
35
36 ### Status files ###
37
38 Structure identical to job headers, but they do not contain a body.
39
40 Known fields:
41
42 Time: <timestamp>               UNIX timestamp of the last status change
43 Status: <code>                  Machine-readable status of the job:
44                                 NOPING - host does not respond to ping
45                                 NOXFER - transfer of the job body to a temporary file
46                                      on the host has failed
47                                 RUN - job is running (present only in log files)
48                                 OK - job executed successfully (however, the job will
49                                      be removed from the queue immediately, so you are
50                                      not likely to see this code)
51                                 FAILED - job failed to execute (i.e., it returned
52                                          a non-zero exit code)
53                                 INTERR - internal error of BEX
54 Message: <msg>                  (Optional) human-readable message explaining the status