|
Manipulating VCM Variables with Cfgedit |
|
|
|
Written by Viglet Team
|
|
Thursday, 07 February 2008 |
|
Cfgedit is a powerful command-line tool that manipulates the VCM variables into configuration files and VCM instance. It is a replacement of the Configuration Console, where doesn’t have Windows installed.
You also will use the cfgedit to edit the as.cfg of your application that contains the VCM API to change the log level and log directory path.
Parameters
host: VCM Instance
port: VCM Instance Port
userid: VCM Administrator
password: VCM Administrator Password
scriptfile: External file with cfgedit commands. The cfgedit connects and run this script.
cfgfile: VCM Configuration File
Connecting
Connect to VCM Instance
Syntax:
cfgedit -h <host>:<port> [-u <userid> -p <password>] [-s <scriptfile>]
For example:
./cfgedit –h vcm01:27110 –u vgnadmin –p vgnadmin123
Config Edit options against a Configuration File
The VCM has following configuration files:
- /appl/vignetteWork/VCM/inst-viglet/conf/cfg.cfg
- /appl/vignetteWork/VCM/inst-viglet/cfgagent/conf/cfa.cfg
- /appl/vignetteWork/VCM/inst-viglet/cfgagent/vcm-viglet/vcms/conf/cms.cfg
- /appl/vignetteWork/VCM/inst-viglet/cfgagent/vcm-viglet/cdsvcs/stage-DELIVERYSTAGE/cds-DELIVERYSTAGE/as/conf/as.cfg
- /appl/vignetteWork/VCM/inst-viglet/cfgagent/vcm-viglet/cdsvcs/stage-DELIVERYSTAGE/cds-DELIVERYSTAGE/cda-DELIVERYSTAGE/conf/cda.cfg
Syntax:
cfgedit [-s <scriptfile>] -F <cfgfile>
For example:
./cfgedit –F /appl/vignetteWork/VCM/inst-viglet/cfgagent/vcm-viglet/cdsvcs/stage-mgmt/cds-mgmt/as/conf/as.cfg
Commands
cd - is a command used to switch directories
Syntax
cd configPath # Changes to the new destination directory
commit - Commits changes for the current product instance
create - Creates a new variable
Syntax
> create variableName value # Creates a new variable and sets the value
> create -f filename variableName # Creates a new variable and sets the value from file
delete – Delete the config variable
Syntax
> delete variableName
describe – Returns variable description
Syntax
> describe variableName
exit – End cfgedit
get – Returns variable value
Syntax
> get -c variableName # Returns config value
> get -d variableName # Returns default value
> get -r variableName # Returns run value
> get -v variableName # Returns revert value
> get -s variableName # Returns variable state
> get -r variableName componentPath # Returns run value for that component
> get -c variableName componentPath # Returns config value for that component
> get -t variableName # Returns variable type
> get -i variableName # Returns variable type Information
help – List information about cfgedit commands
ignore - Config Edit option for ignore(batchfile mode only):
Syntax
> ignore on # Continues processing commands ignoring errors
> ignore off # Exits upon the first occurrence of an error
list | ls – List variables:
Syntax
[-f filename] # Write to file
[-l ] # Create a long listing
[-L ] # Create a long listing with config, run and revert value
[-n ] # List nodes only
[-v ] # List variables only
[-o ] # List override variables only
[-r ] # Recursive listing
[-u ] # List variables used by this node
set - Allows you to change one variable value
Syntax
> set variableName value # Set the config value
> set -f filename variableName # Set the config value from a file
> set -o var componentPath # Unset the override value for the componentPath
> set +o var componentPath value # Set the override value for the componentPath
Listing All VCM Variables
You can get all VCM variables and copy these variables into one file with 2 lines:
echo list -v -L -r -f /tmp/lcvars.txt > /tmp/lcvars.script
VCMDIR/bin/cfgedit -s /tmp/lcvars.script -F /AS_CFG_PATH/as/conf/as.cfg
The first line will create the /tmp/lcvars.script with the command that lists all variables into /tmp/lcvars.txt. The second line will run the script /tmp/lcvars.script to /AS_CFG_PATH/as/conf/as.cfg file.
Discuss this article on the forums. (0 posts)
|