CTL-CHECK Command Reference
From ControlTier
Requires Version: 3.4.9
Contents |
Synopsis
ctl-check [-vq] -d basedir -n nodename [-N hostname] -s serverhostname [ --key=value ]
Overview
ctl-check analyzes the configuration properties files within a particular CTL Base directory (known as CTL_BASE). You can use it to verify that configuration is correct for a particular base directory to connect to a particular server.
Options
| Option | Argument | Description |
|---|---|---|
| -d | true | specifies the CTL_BASE path to check. |
| -n | true | specify the name of the Node object in the CTL_BASE directory. |
| -N | true | specify the hostname of the Node object in the CTL_BASE directory. If -N is not specified, then the node name value will also be used as the hostname.
|
| -s | true | specifies the server hostname. |
| -q | false | executes the tool in "quiet" mode, where no output is printed, and only the exit status of the command tells whether the check succeeded or failed |
| -v | false | Verbose mode prints additional information |
You can also include other pertinent configuration properties to compare with the --key=value construction.
Note that the "ctl-check" command takes many of the same options as the "ctl-setup" command. This is because it essentially checks the configuration files in the CTL_BASE directory against the values that would be set if "ctl-setup" had been run with the same input properties.
Output
If no errors are found, and the verbose option is not set, then there will be no output, and the tool with exit with no error code.
Example execution:
[ctier@centos5 ~]$ ctl-check -d $HOME/ctier/ctl -n centos5 -N centos5 -s centos5 (no output)
If any property is set incorrectly, then the tool will exit with a positive error code, and there may be some output printed.
You can use the -v "verbose" option to enable more detailed output.
[ctier@centos5 ~]$ ctl-check -d $HOME/ctier/ctl -n centos5 -s centos5 -v . Checking properties: /home/ctier/ctier/ctl/etc/framework.properties . 97/97 required properties OK . Checking properties: /home/ctier/ctier/ctl/etc/project.properties . 4/4 properties OK . 4/4 required properties OK . Checking properties: /home/ctier/ctier/ctl/etc/log4j.properties . 21/21 properties OK . Checking properties: /home/ctier/ctier/ctl/etc/resource.properties . 10/10 required properties OK . Checking properties: /home/ctier/ctier/ctl/etc/modules.properties . 2/2 required properties OK . Checking properties: /home/ctier/ctier/ctl/etc/node.properties . 5/5 properties OK . 3/3 required properties OK . OK: CTL Base directory check complete: /home/ctier/ctier/ctl
If an incorrect property value is found, it is printed:
[ctier@centos5 ~]$ ctl-check -d $HOME/ctier/ctl -n localhost -s localhost ! incorrect property: framework.node=centos5 [expected=localhost] ! incorrect property: framework.jobcenter.url=http://centos5:8080/jobcenter [expected=http://localhost:8080/jobcenter] ! incorrect property: framework.node.hostname=centos5 [expected=localhost] ! incorrect property: framework.server.url=http://centos5:8080/itnav [expected=http://localhost:8080/itnav] ! incorrect property: framework.node.name=centos5 [expected=localhost] ! incorrect property: framework.webdav.uri=http://centos5:8080/jackrabbit/repository/controltier/projects [expected=http://localhost:8080/jackrabbit/repository/controltier/projects] ! incorrect property: framework.server.hostname=centos5 [expected=localhost] ! file had errors: /home/ctier/ctier/ctl/etc/framework.properties ! incorrect property: node.name=centos5 [expected=localhost] ! incorrect property: node.hostname=centos5 [expected=localhost] ! file had errors: /home/ctier/ctier/ctl/etc/node.properties ! NOT OK: CTL Base directory check FAILED: /home/ctier/ctier/ctl
The output prints the values which were incorrect, along with the expected values. It also prints the path of any files that had incorrect values. Finally it prints that the base directory check failed.
| ||||||||||||||