source: tags/0.9/stopos.man @ 9

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

willem

File size: 5.1 KB
Line 
1.\"
2.\" Copyright 2013 Willem Vermin, SURFsara
3.\"
4.\" Licensed under the Apache License, Version 2.0 (the "License");
5.\" you may not use this file except in compliance with the License.
6.\" You may obtain a copy of the License at
7.\"
8.\"     http://www.apache.org/licenses/LICENSE-2.0
9.\"
10.\" Unless required by applicable law or agreed to in writing, software
11.\" distributed under the License is distributed on an "AS IS" BASIS,
12.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13.\" See the License for the specific language governing permissions and
14.\" limitations under the License.
15.\"
16
17.TH STOPOS 1 
18.SH NAME
19stopos \- alias to call the program stoposclient and eval it's output
20.SH SYNOPSIS
21.B stopos
22\fB\ -h,--help  \fP 
23.P 8
24.B stopos
25\fB\ -v,--version  \fP 
26.P 8
27.B stopos
28\fB\ create \fP   [\fB -p,--pool POOL\fP ]
29.P 8
30.B stopos
31\fB\ status \fP   [\fB -p,--pool POOL\fP]
32.P 8
33.B stopos
34\fB\ purge \fP    [\fB -p,--pool POOL\fP ]
35.P 8
36.B stopos
37\fB\ pools \fP
38.P 8
39.B stopos
40\fB\ add   \fP    [\fB -p,--pool POOL\fP ] [\fB FILENAME \fB]
41.P 8
42.B stopos
43\fB\ next  \fP    [\fB -p,--pool POOL\fP ] [\fB -m,--multi \fB]
44.P 8
45.B stopos
46\fB\ remove \fP   [\fB -p,--pool POOL\fP] [\fB KEY \fP ]
47.P 8
48.B stopos
49\fB\ dump \fP     [\fB -p,--pool POOL\fP]
50.P 8
51The -q,--quiet flag supresses most output.
52.P 8
53.SH DESCRIPTION
54Stopos is an alias using the program stoposclient, an utility to store
55and retrieve text lines in a pool.
56In general, the
57text lines are used as command parameters, see Examples.
58.SH COMMANDS
59.TP 4
60.B -h,--help
61Prints usage information.
62.TP 4
63.B -v,--version
64Prints version.
65.TP 4
66.B create [ -p,--pool POOL ] [ FILENAME ]
67Creates new pool.
68A pool with the same name will be removed first.
69.TP 4
70.B status
71Prints to standard error       environment variable
72.br
73---------------------------------------------------
74.br
75total number of lines added      STOPOS_COUNT
76.br 
77number of lines present          STOPOS_PRESENT
78.br
79number of lines never committed  STOPOS_PRESENT0
80.TP 4
81.TP 4
82.B purge [-p,--pool POOL ]
83Removes the pool.
84.TP 4
85.B pools [-p,--pool POOL ]
86Lists on standard error the pools available. The environment
87variable STOPOS_VALUE is set accordingly.
88.TP 4
89.B add [ -p,--pool POOL ] [ FILENAME ]
90Adds lines from FILENAME, default from stdin.
91The environment variables STOPOS_RC and STOPS_KEY are set.
92.br
93NOTE: when stopos is reading from a pipe as in:
94.br
95   cat parmfile | stopos add
96.br
97no environment variables are set.
98.TP 4
99.B next [ -p,--pool POOL ] [ -m,--multi ]
100Gets the next line from the pool.
101The environment variables STOPOS_VALUE, STOPOS_COMMITTED and STOPOS_KEY are set,
102see ENVIRONMENT.
103By default, the same line in the pool will be
104produced only once. When all lines are commited, STOPS_RC will not
105be equal to OK. Using the --multi flag, the same line can be produced
106more than once, if necessary stopos will wrap around.
107This can be useful for dealing with crashed jobs.
108.TP 4
109.B remove [-p,--pool POOL ] [ KEY ]
110Removes the line with key KEY as ready.
111If not specified on the commandline, the
112value of environment variable STOPOS_KEY is used.
113.TP 4
114.B dump  [-p,--pool POOL ]
115Reads the next available line, and puts it,
116preceded by it's key and number of commitments in environment variable
117STOPOS_VALUE. The first call will produce the first line.
118When all lines have been delivered, STOPOS_RC
119gets a value other than OK. A subsequent call will start the dump
120with the first line again.
121.SH OPTIONS
122.TP 4
123.B -p,--pool POOL
124POOL is a unique name of the pool.
125Default: pool.
126The name of the pool can also be set using the environment variable STOPOS_POOL. The command line flag has precedence.
127
128.SH ENVIRONMENT
129Stopos sets the following environment variables:
130.P
131.B STOPOS_RC
132if the value is OK, than no errors were found
133.P
134.B STOPOS_KEY
135contains the keyvalue of the line produced with the 'next' command
136.P
137.B STOPOS_COMMITTED
138contains the number of times the line has been committed
139.P
140.B STOPOS_VALUE
141contains the line produced by the 'next' command or the result of the 'pools' command
142.P
143.B STOPOS_COUNT STOPOS_PRESENT STOPOS_PRESENT0
144see the 'status' command above
145.P
146Stopos uses the following environment variables:
147.P
148.B STOPOS_POOL 
149see the description of the --pool flag under OPTIONS
150.P
151.B STOPOS_KEY 
152see the 'remove' flag above
153.P
154.B STOPOS_SERVER_URL 
155the url stopos uses to access the server, default DEFAULTSERVERURL
156
157.SH EXAMPLES
158.TP 4
159
160Create a pool with the first 10 lines from the man page of sed:
161
162 man sed | head > parmfile
163 stopos create
164 stopos add parmfile
165
166Get a line:
167
168 stopos next
169
170The environment variable STOPOS_VALUE contains now one of the
171first ten lines of the man page of sed.
172
173You can use this in a command like this:
174
175 eval "myparser $STOPOS_VALUE"
176
177The line can be removed by:
178
179 stopos remove
180
181Finally, the pool can be completely removed by:
182
183 stopos purge
184
185.SH FILES
186$HOME/.stopos/id
187.br
188This file is set by stopos to store an unique id, which, together
189with the login name, will be used to identify which pools are yours.
190.SH "SEE ALSO"
191sara-get-mem-size(1), sara-get-num-cores(1), stoposclient(1), stoposdump(1)
192.SH AUTHORS
193Willem Vermin
194.br
195.SH BUGS
196No bugs known yet.
Note: See TracBrowser for help on using the repository browser.