The jobagent.sh
(or jobagent.bat
on
Windows) is a command-line utility for controlling the job agent.
The syntax is:
./jobagent.sh [options] command
The options are optional, but a command
must always be given. The script is located in the
<base-dir>/bin
directory and you must
change to that directory to be able to use the script.
-c
The path to the configuration file to use, for example:
./jobagent.sh -c other.config start
The default value is jobagent.properties
.
The classpath is not searched which means that it doesn't find
the configuration file in <base-dir>/www/WEB-INF/classes/
unless you specify the path to it.
See Appendix F, jobagent.properties reference
for more information about job agent configuration files.
register
Register the job agent with the BASE server. If the job agent already exists this command does nothing.
unregister
Unregister/delete the job agent from the BASE server. If the job agent does not exist this command does nothing.
start
Start the job agent. As soon as it is up and running it will check the database for jobs that are waiting to be executed.
pause
Pause the job agent. The job agent will continue running but
does not check the database for jobs. To start it again use the
start
command.
stop
Stop the job agent. To start it again use the start
command.
info
Get information about the job agent. This will output a string
in the form:
Status can be either
Status:Running
Cpu:15
Total memory:8254955520
Used memory:8002252800
Job:42
Job.42.slot:SHORT
Running
or Paused
. There is some information about the
current CPU and memory usage, but this information may not be available on
all platforms. For each job that is currently running, the ID is given. A
second entry gives information about the slot the job uses for execution.
In the future, the info
command may output more information.
status
Similar to the info
command but with less output.
The output is either Running, Pauses or Stopped
.
In case of an unexpected error, an error message may be displayed instead.
help
Display usage information.