TRICKS
author viric@llimona
Mon, 02 Apr 2007 17:53:52 +0200
changeset 74 bb1b20d79acf
parent 57 ab48625beecb
child 79 f99c2548fac4
permissions -rw-r--r--
Marking the TODO for 0.3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     1
System wide queue
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     2
-------------------------
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     3
You can set the $USER variable to the same name in all 'ts' processes, and then
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     4
they'll use the same socket for intercommunication. This means - single queue.
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     5
You should be certain that any 'ts' can read/write to that socket, using
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     6
chmod. The current socket naming is:
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     7
  /tmp/socket-ts.$USER
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     8
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     9
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    10
Be notified of a task finished
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    11
-------------------------
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    12
In X windows, inside bash, after submitting the task, I use:
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    13
$ ( ts -w ; xmessage Finished! ) &
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    14
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    15
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    16
Add a task to the queue, and receive its output by email (by Raul)
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    17
-------------------------
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    18
It only works if 'ts' outputs the jobid.
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    19
$ id=$(ts sleep 10) && ts -w $id && ts -c $id | mail -s taskend $USER &
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    20