Starting from the Command Line

Use the acuserve -start command to start acuserve. On Windows NT and Windows 2000 to 2008 servers, this option also installs AcuServer as a Windows NT/2000/2003/2008 service, if it is not already installed, unless the -f option is specified. (If -f is specified, AcuServer runs as a foreground process.)

Any -start options that you use when you first start acuserve as a service/daemon are stored and used as the default startup options. If you do not specify any -start options, acuserve uses the existing defaults.

The acuserve program is started in background unless the -f option is specified.

If acuserve is already running, AcuServer will output the message:

acuserve is already running on hostname

A new acuserve process will not be started. If you want to start AcuServer with new options, you must stop and restart acuserve.

Note: On Windows NT and Windows 2000 to 2008 systems, it is best to specify acuserve -start with no options, so that acuserve uses the start-up parameters that were stored when you installed acuserve as a Windows service.

Optional arguments to -start include:

Option Description
-c      Specifies the name and path of the server configuration file. The -c must be followed by a space and then the path and name of the server configuration file. When -c is not used, acuserve looks for the configuration file in its default location: /etc/a_srvcfg for UNIX or \etc\a_srvcfg for Windows NT/2000.
-d Indicates that acuserve should track memory usage. This option is used in conjunction with the acuserve -statistics command. See Tracking Server Statistics for more information.
-e Causes error output from acuserve to be output to the named file. The -e must be followed by a space and the path and name of the error output file.

If -e is not specified, acuserve will attempt to direct error output to /dev/console in UNIX or to a file named acuserve.err in Windows. This file resides in the Windows NT/2000 system directory (typically c:\winnt\system32).

If these directories cannot be opened, acuserve will attempt to append to a file named acuserve.err in the current directory. If that file doesn't exist, or if the file append fails, acuserve will print the message acuserve: can't open error output file to standard output, and acuserve will terminate.

-f By default, acuserve runs in background. Use the -f option to run acuserve in foreground. When run in foreground, the acuserve process traps normal keyboard signals, such as Control+C.

If combined with the -t option, the -f option causes acuserve to display tracing and transaction messages directly to the screen. However, if the -e switch is used, all messages are placed in the named log file.

Note: If you specify the -f option on a Windows NT/2000 machine, acuserve will not install itself or run as a Windows NT/2000 service.
-g Causes the error file specified with the -e option to be compressed using gzip compression. Note that the name of the error file is not automatically modified to indicate that compression is being used; you may wish to assign the file a .gz extension.
-l Causes a listing of the server configuration file to be printed to standard error output. This can be helpful when you are debugging problems that may be related to configuration variables. When this option is combined with the -e option, the listing is captured in the error output file.
-n Assigns a port number to this instance of the acuserve program. The -n must be followed by a space and then an integer, for example, 6524. This value overrides the ACUSERVER_PORT value set in the server configuration file.

The -n option associates a port number with one instance of the acuserve daemon. Client applications can, in turn, be assigned to a particular instance of the acuserve daemon via the ACUSERVER_PORT variable in the runtime configuration file.

The acuserve daemon can work with privileged port numbers (from 0 to 1023) and with non-privileged port numbers (1024 and higher). Privileged port numbers are useful for external, secure applications.

Note: If you start acuserve on two ports, you must also specify all start-up arguments, including the configuration file, as in:
acuserve -start -n 6523 -c c:\etc\config1 [other options]
acuserve -start -n 6524 -c c:\etc\config2 [other options]
-t # Turns on file tracing and transaction logging. When combined with the -e option, file trace and transaction messages are placed in the named error file. "#" represents the type of tracing or logging to be performed:
  • 1 turns on file tracing, and a message is printed to standard output every time a file operation is performed. The message includes the type of file operation performed, the name of the target file or file ID, and the values of any applicable keys.
  • 2 turns on connection information logging, and a message is output whenever a connection request is made, a disconnect is performed, or an acuserve -kill or acuserve -unlock command is processed.
  • 3 turns on file tracing and connection information logging.
  • 5 turns on file tracing and flushes the error file after each write operation. (File trace flushing can also be controlled with the FILE_TRACE_FLUSH server configuration variable. See Server Configuration Variables for more information.
  • 6 turns on connection information logging and flushes the error file after each write operation.
  • 7 turns on file tracing and connection information logging and flushes the error file after each write operation.
Note: You can also set these trace levels using the FILE_TRACE server configuration variable.

Note that when AcuServer is started as a Windows NT, Windows 2000 to 2008 service, all paths used in the configuration file or on the command line are relative to the Windows NT, Windows 2000 to 2008 system directory (for example, c:\winnt\system32). For instance, if your current directory is c:\Program Files\acucorp\acucbl8.x.x\AcuGT\bin, and you start AcuServer with the command acuserve -start -le acuserve.log, the log file will not be created in the current acuserve -start -le acuserve.logdirectory, but rather in the \winnt\system32 directory. If desired, you can use full pathnames, which has the effect of using an explicit file.