source: tags/1.0/disparm.1 @ 5

Last change on this file since 5 was 5, checked in by willem, 9 years ago

willem

File size: 3.7 KB
Line 
1.TH DISPARM 1
2.SH NAME
3disparm \- alias using disparmcmd to call the program disparmcmd
4.SH SYNOPSIS
5.B disparm
6\fB\ -h,--help  \fP 
7.P 8
8.B disparm
9\fB\ -c,--create  \fP [\fB OPTIONS\fP ] [\fB -i,--input INPUTFILE \fB]
10.P 8
11.B disparm
12\fB\ -n,--next  \fP [\fB OPTIONS\fP ] [\fB -m,--max MAX \fB]
13.P 8
14.B disparm
15\fB\ -r,--ready  \fP [\fB OPTIONS\fP] [\fB -k, --key KEY \fP ]
16.P 8
17.B disparm
18\fB\ -R,--REMOVE  \fP [\fB OPTIONS\fP] [\fB -p, --pool POOL \fP ]
19.P 8
20.B disparm
21\fB\ -s,--stats [\fB -p, --pool POOL \fP ]
22.P 8
23.B disparm
24\fB\ -u,--unhandled [\fB -p, --pool POOL \fP ]
25.P 8
26.B disparm
27\fB\ -D,--debug [\fB -p, --pool POOL \fP ]
28.SH DESCRIPTION
29disparm is an alias using disparmcmd, an utility to distribute
30strings (parameters) in a pool, in an orderly way.
31In general, the
32strings are used as command parameters, see Examples.
33.SH COMMANDS
34.TP 4
35.B -h,--help
36Prints usage information.
37.TP 4
38.B -c,--create [ -i,--input INPUTFILE ] [ -p,--pool POOL ]
39Creates new pool and fills it with lines from INPUTFILE, default
40from stdin. INPUTFILENAME '-' stands for stdin.
41See OPTIONS for a description of POOL.
42The environment
43variable 'DISPARM_RC' is set, see ENVIRONMENT.
44.TP 4
45.B -n,--next [ -m,--max MAX ] [ -p,--pool POOL ]
46Gets the next string.
47The environment variables DISPARM_RC, DISPARM_VALUE, DISPARM_COMMITTED and DISPARM_KEY are set,
48see ENVIRONMENT.
49The same string in the pool will be
50produced MAX times, the default is 1. By setting this to a higher
51value, the same string will be produced more times. This can be useful
52for dealing with crashed jobs.
53See OPTIONS for a description of POOL.
54.TP 4
55.B -r,--ready [ -k,--key KEY ] [-p,--pool POOL ]
56Marks the token with key KEY as ready. If not specified on the commandline, the
57value of environment variable DISPARM_KEY is used.
58See OPTIONS for a description of POOL.
59.TP 4
60.B -R,--REMOVE --p,--pool POOL ]
61Removes the pool.
62See OPTIONS for a description of POOL.
63.TP 4
64.B -s,--stats
65Prints to standard error:
66
67.br
68total number of strings in pool
69.br
70number of strings delivered
71.br
72number of strings marked as ready
73.br
74maximum one string has been delivered
75.TP 4
76.B -u,--unhandled
77Prints to standard error the strings that are committed, but not marked
78as ready.
79.TP 4
80.B -D,--debug
81Prints to standard error some debug information.
82.SH OPTIONS
83All options accept the following general parameters:
84.TP 4
85.B -p,--pool POOL
86POOL is a unique name of the file that contains the pool.
87Default: pool.disparm in the current directory.
88.TP 4
89.B -d,--lockdir LOCKDIR
90LOCKDIR is a directory to hold the lockfile (implemented as a hard
91link to the pool file). All lockfiles have different names,
92so it is permitted to use the same directory for all uses of disparm.
93Default: the directory where the pool resides.
94
95.SH ENVIRONMENT
96The following environment variables can be set by disparm:
97.P
98.B DISPARM_RC
99if the value is OK, than no errors were found
100.P
101.B DISPARM_KEY
102contains the keyvalue of the token
103.P
104.B DISPARM_LINENO
105contains the line number of the string in the file from which
106the pool file has been created
107.P
108.B DISPARM_COMMITTED
109contains the number of times the string has been committed before
110.P
111.B DISPARM_VALUE
112contains the token
113.SH EXAMPLES
114.TP 4
115
116Create a pool with the firat 10 lines from the man page of sed:
117
118 man sed | head > parmfile
119 disparm -c -p demo1 -i parmfile
120
121Get a line:
122
123 disparm -n -p demo1
124
125The environment variable DISPARM_VALUE contains now one of the
126first ten lines of the man page of sed.
127
128You can use this in a command like this:
129
130 eval "myparser $DISPARM_VALUE"
131
132The token can be marked as ready by:
133
134 disparm -r -p demo1
135
136Finally, the pool can be completely removed by:
137
138 disparm -R -p demo1
139
140.SH "SEE ALSO"
141sara-get-mem-size(1), sara-get-num-cores(1), disparmcmd(1)
142.SH AUTHORS
143Willem Vermin
144.br
145.SH BUGS
146No bugs known yet.
Note: See TracBrowser for help on using the repository browser.