Kwservicekwservice administers the Klocwork Servers. You can manage the Klocwork servers remotely on Unix with SSH, or on Windows with Windows Services administration. Otherwise, you must issue the start, restart and stop commands locally. For the remaining kwservice subcommands, the projects_root directory must be visible from the machine you're logged into. Usagekwservice [common-options] <subcommand> [options] Example
kwservice --projects-root C:\Klocwork 2018.1 Server\projects_root start license
Common options
Examples variablesThe examples in this article use the following variables:
kwservice checkUse the kwservice check command to check the status of all of the Klocwork Servers, or an individual Klocwork Server. Note for Windows: If you are running the Klocwork Servers as Windows Services, which is the default setup, you must use Windows Services administration to start, stop and check the Klocwork Servers, rather than kwservice. Usage kwservice --projects-root <projects_root> check [<service_name>] Examples To check the status of all Klocwork Servers: kwservice --projects-root C:\Klocwork\projects_root check To check the status of the License Server: kwservice --projects-root C:\Klocwork\projects_root check license kwservice get-service-propertiesUse the kwservice get-service-properties command to view the host name and port number of the Klocwork servers. Usage kwservice --projects-root <projects_root> get-service-properties <service_name> Examples kwservice --projects-root C:\Klocwork\projects_root get-service-properties klocwork kwservice list-servicesUse this command to list the Klocwork Servers. Usage kwservice --projects-root <projects_root> list-services Examples kwservice --projects-root C:\Klocwork\projects_root list-services kwservice restartUse this command to stop and then restart all or individual Klocwork Servers in one step. Note for Windows: If you are running the Klocwork Servers as Windows Services, which is the default, you must use Windows Services administration to start, stop and check the Klocwork Servers, rather than kwservice. Note: You can manage the Klocwork Servers remotely on Unix with SSH, or on Windows with Windows Services administration. Otherwise, you must issue the start, restart and stop commands servers locally.
Usage kwservice --projects-root <projects_root> restart [<service_name>] Examples To restart all Klocwork Servers: kwservice --projects-root C:\Klocwork\projects_root restart To restart the License server: kwservice --projects-root C:\Klocwork\projects_root restart license kwservice set-service-propertyUse this command to set properties for the Klocwork servers. Note: You must stop the relevant server before running this command. See kwservice stop.
Usage kwservice --projects-root <projects_root> set-service-property <service_name> <property> <value>
kwservice setupUse this command to set up and initialize additional projects_root directories. A single projects_root directory is created automatically during installation. A projects_root directory is the data location for the Klocwork servers and applications. It contains Klocwork server settings and information about integration projects and build analysis runs. It also stores the Klocwork license file. The default location is <Server_install>/projects_root. If your project_root directory is not in the default location, you need to specify its location, as well as the location of the additional projects_root you want to create. If you need to create additional projects_root directories, contact Klocwork Customer Support for more information. Usage kwservice --projects-root <new_projects_root> setup [options] where:
Important: The maximum length of the path to the projects_root is 68-72 characters, depending on the length of the Database server (mysql) port number (1-5 digits). Example 1 (default location used for projects_root) kwservice --projects-root C:\Klocwork\projects_root_2 setup Example 2 (non-default location used for projects_root) kwservice setup --old-pr C:\mydatabase\projects_root --projects-root C:\mydatabase\projects_root_2 Options
kwservice startUse this command to start all or individual Klocwork Servers. Note for Windows: If you are running the Klocwork Servers as Windows Services, which is the default setup, you must use Windows Services administration to start, stop and check the Klocwork Servers, rather than kwservice. Note: You can manage the Klocwork Servers remotely on Unix with SSH, or on Windows with Windows Services administration. Otherwise, you must issue the start, restart and stop commands on the servers locally.
Usage kwservice --projects-root <projects_root> start [<service_name>] Examples To start all Klocwork Servers: kwservice --projects-root C:\Klocwork\projects_root start To start the Klocwork Server: kwservice --projects-root C:\Klocwork\projects_root start klocwork Note on migrate option The --migrate option is used to migrate a projects_root from a previous version of Klocwork. For information on upgrading, see Upgrading from a previous version. kwservice stopUse this command to stop all or individual Klocwork Servers. Note for Windows: If you are running the Klocwork Servers as Windows Services, which is the default setup, you must use Windows Services administration to start, stop and check the Klocwork Servers, rather than kwservice. Note: You can manage the Klocwork Servers remotely on Unix with SSH, or on Windows with Windows Services administration. Otherwise, you must issue the start, restart and stop commands servers locally.
Usage kwservice --projects-root <projects_root> stop [<service_name>] Examples To stop all Klocwork Servers: kwservice --projects-root C:\Klocwork\projects_root stop To stop the Klocwork Server: kwservice --projects-root C:\Klocwork\projects_root stop klocwork |