TRICKS
author viric@llimona
Fri, 13 Apr 2007 20:50:31 +0200
changeset 125 b60f173b1489
parent 79 f99c2548fac4
child 165 7b914d4003c2
permissions -rw-r--r--
Copyright for list.c
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
-------------------------
79
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
     3
You can set the $TS_SOCKET variable to the same name path for all your
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
     4
'ts' processes, and then
57
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
     5
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
     6
You should be certain that any 'ts' can read/write to that socket, using
79
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
     7
chmod.
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
     8
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
     9
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
    10
A queue for each resource
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
    11
-------------------------
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
    12
You can use $TS_SOCKET and aliases/scripts for having different queues for
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
    13
different resources. For instance, using bash:
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
    14
alias tsdisk='TS_SOCKET=/tmp/socket.disk ts'
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
    15
alias tsram='TS_SOCKET=/tmp/socket.ram ts'
f99c2548fac4 Updated tricks.
viric@llimona
parents: 57
diff changeset
    16
alias tsnet='TS_SOCKET=/tmp/socket.net ts'
57
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
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    19
Be notified of a task finished
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    20
-------------------------
ab48625beecb Added a compilation of tricks.
lbatlle@npdl268.bpo.hp.com
parents:
diff changeset
    21
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
    22
$ ( ts -w ; xmessage Finished! ) &