AccuRev includes facilities for controlling the operation of the AccuRev Server, the Watchdog, and the AccuRev Database Server. The user interface varies by platform:
If the AccuRev Server and the AccuRev Database Server are running on a UNIX/Linux machine, you can control its operation with the
acserverctl script. This is a Bourne-shell script, located in the AccuRev
bin directory. (It is based on the control script for the Apache Web server.)
The acserverctl script also controls the AccuRev Database Server. The AccuRev Server process is dependent upon the Database Server process; if it is not running the AccuRev Server will not start.
Note: by default, acserverctl assumes that AccuRev is installed at
/opt/accurev. If this is not the case, you must run
acserverctl in an environment where
ACCUREV_BIN is set to the pathname of the AccuRev
bin directory. For example:
acserverctl provides a set of non-interactive commands. The format of each command is:
(Omitting <command-name> is equivalent to executing
acserverctl help.) The commands are:
If the AccuRev Server and AccuRev Database Server are running as services on a Windows machine, you can control their operation from the
Services control panel. In some versions of Windows, this control panel is in a subdirectory called
Administrative Tools.
start
stop
pause
resume
restart
For descriptions of these commands, see UNIX/Linux: ‘acserverctl’ Utility above. The
restart command brings down both the Server and the Watchdog, by performing a
stop followed by a
start. For the AccuRev Database Server, the
start,
stop, and
restart commands perform the equivalent of the
dbstart,
dbstop, and
dbrestart commands in
acserverctl.
On all platforms, the AccuRev Server and Watchdog processes check, once per second, for the existence of several server-control files in the
site_slice directory. The existence of the server-control file causes the process to perform a particular action. In most cases, the contents of the file are irrelevant; a zero-length file will do.
(used by the pause server-control command) Tells the Server to stop accepting new requests from AccuRev clients. The Server completes transactions that are already in progress and logs its “paused” status to the log file. Then, it continues to run, but the only thing it does is monitor the
acserver.command.pause file. When this server-control file is removed, the Server resumes normal operation.
This server-control file is not removed when a new Server process starts up. If the file exists, the Server starts up in the paused state.
(used by the stop and
restart server-control commands) Tells the Server to “finish up quickly” and exit. The Server immediately stops accepting new requests from AccuRev clients. It continues to work on transactions that are already in progress, but it aborts any transactions that are not completed within 10 seconds. Then, the Server exits.
(used by the stop server-control command) Tells the Watchdog to exit cleanly. When the Server detects that the Watchdog has exited, it exits also, just as if it had found an
acserver.command.shutdown file (see above). In this case, however, there is no longer a Watchdog process, so no restart of the Server takes place.
Use this capability only as a last resort. Typically, it is preferable to restart the entire AccuRev Server (which allows in-progress tasks to complete), rather than terminating just one of its worker threads.
echo 42 > tempfile
mv tempfile acserver.command.taskkill
Using the mv (or
move) command instead of the
echo command to create the
taskkill file prevents a race condition that might cause the server to see
taskkill as an empty file.
Important! After terminating a thread, restart the AccuRev Server as soon as possible. This minimizes the likelihood that terminating the thread will cause a memory resource leak in the Server process, impairing overall system performance.