source: trunk/doc/src/docbook/appendix/jobagent.sh.xml @ 3992

Last change on this file since 3992 was 3992, checked in by Nicklas Nordborg, 16 years ago

Fixes #728: jobagent.sh should accept command status

Also made the jobagent log into it's own file (jobagent.log) instead of stdout

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 5.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE appendix PUBLIC
3    "-//Dawid Weiss//DTD DocBook V3.1-Based Extension for XML and graphics inclusion//EN"
4    "../../../../lib/docbook/preprocess/dweiss-docbook-extensions.dtd">
5<!--
6  $Id: jobagent.sh.xml 3992 2007-11-22 13:19:37Z nicklas $
7 
8  Copyright (C) 2007 Jari Hakkinen, Peter Johansson, Nicklas Nordborg
9 
10  This file is part of BASE - BioArray Software Environment.
11  Available at http://base.thep.lu.se/
12 
13  BASE is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License
15  as published by the Free Software Foundation; either version 2
16  of the License, or (at your option) any later version.
17 
18  BASE is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with this program; if not, write to the Free Software
25  Foundation, Inc., 59 Temple Place - Suite 330,
26  Boston, MA  02111-1307, USA.
27-->
28
29<appendix id="appendix.jobagent.sh">
30  <title>jobagent.sh reference</title>
31
32  <para>
33    The <filename>jobagent.sh</filename> (or <filename>jobagent.bat</filename> on
34    Windows) is a command-line utility for controlling the job agent.
35    The syntax is:
36
37    <informalexample>
38    <programlisting>
39./jobagent.sh [options] command
40</programlisting>
41    </informalexample>
42
43    The options are optional, but a <command>command</command>
44    must always be given. The script is located in the
45    <filename>&lt;base-dir&gt;/bin</filename> directory and you must
46    change to that directory to be able to use the script.
47  </para>
48
49
50  <simplesect id="appendix.jobagent.sh.options">
51    <title>Options</title>
52   
53    <variablelist>
54    <varlistentry>
55      <term><option>-c</option></term>
56      <listitem>
57        <para>
58          The path to the configuration file to use, for example:
59         
60          <informalexample>
61          <programlisting>
62./jobagent.sh -c other.config start
63</programlisting>
64          </informalexample>
65         
66          The default value is <filename>jobagent.properties</filename>.
67          The classpath is not searched which means that it doesn't find
68          the configuration file in <filename>&lt;base-dir&gt;/www/WEB-INF/classes/</filename>
69          unless you specify the path to it.
70          See <xref linkend="appendix.jobagent.properties" /> 
71          for more information about job agent configuration files.
72        </para>
73      </listitem>
74    </varlistentry>
75    </variablelist>
76    </simplesect>
77
78  <simplesect id="appendix.jobagent.sh.commands">
79    <title>Commands</title>
80   
81    <variablelist>
82    <varlistentry>
83      <term><command>register</command></term>
84      <listitem>
85        <para>
86          Register the job agent with the BASE server.
87          If the job agent already exists this command does nothing.
88        </para>
89      </listitem>
90    </varlistentry>
91
92    <varlistentry>
93      <term><command>unregister</command></term>
94      <listitem>
95        <para>
96          Unregister/delete the job agent from the BASE server. If the
97          job agent does not exist this command does nothing.
98        </para>
99      </listitem>
100    </varlistentry>
101
102    <varlistentry>
103      <term><command>start</command></term>
104      <listitem>
105        <para>
106          Start the job agent. As soon as it is up and running it will
107          check the database for jobs that are waiting to be executed.
108        </para>
109      </listitem>
110    </varlistentry>
111   
112    <varlistentry>
113      <term><command>pause</command></term>
114      <listitem>
115        <para>
116          Pause the job agent. The job agent will continue running but
117          does not check the database for jobs. To start it again use the
118          <command>start</command> command.   
119        </para>
120      </listitem>
121    </varlistentry>
122
123    <varlistentry>
124      <term><command>stop</command></term>
125      <listitem>
126        <para>
127          Stop the job agent. To start it again use the <command>start</command>
128          command.   
129        </para>
130      </listitem>
131    </varlistentry>
132
133    <varlistentry>
134      <term><command>info</command></term>
135      <listitem>
136        <para>
137          Get information about the job agent. This will output a string
138          in the form:
139          <computeroutput>
140          <literallayout>
141Status:Running
142Job:1
143Job:5
144</literallayout>
145</computeroutput>
146          <emphasis>Status</emphasis> can be either <constant>Running</constant>
147          or <constant>Paused</constant>. For each job that is currently
148          running, the ID is given. In the future, the <command>info</command>
149          command may output more information. For example, there is already
150          infrastructure code for CPU and memory usage. The only problem is
151          that the information is not easy to get for a Java program.
152        </para>
153      </listitem>
154    </varlistentry>
155   
156    <varlistentry>
157      <term><command>status</command></term>
158      <listitem>
159        <para>
160          Similar to the <command>info</command> command but with less output.
161          The output is either <computeroutput>Running, Pauses or Stopped</computeroutput>.
162          In case of an unexpected error, an error message may be displayed instead.
163        </para>
164      </listitem>
165    </varlistentry>
166
167    <varlistentry>
168      <term><command>help</command></term>
169      <listitem>
170        <para>
171          Display usage information.   
172        </para>
173      </listitem>
174    </varlistentry>
175
176    </variablelist>
177    </simplesect>
178
179</appendix>
180
Note: See TracBrowser for help on using the repository browser.