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