DCA utilities

1. dca_setup : The DCA Setup utility is an administration tool for the DCA. Through the DCA Setup utility a user can install, upgrade, and modify settings on a DCA.
Synopsis
dca_setup
dca_setup [ --config configuration_file | -c configuration_file ] [-a]
dca_setup --help
Description
The DCA Setup utility was implemented starting in DCA software version 1.1.0.0 to automate common tasks performed on a DCA. The DCA Setup utility can be run in an interactive mode (default) or as a batch script using a configuration file. Using a configuration file is best done when there are multiple changes to be made, such as configuration of custom IP addresses in a VLAN overlay.
Usage:
 Must be run as the user root
 Must be run from the Primary or Standby Master server
 Only one instance can be run at one time.
 Navigation is done by entering the numeric option or sub-option and pressing ENTER.
 Use B to navigate back one level.
 Use X to exit.
 Use A to apply changes.
Options
--config configuration_file | -c configuration_file  : Specify a configuration file for a batch mode. This option is best used when making multiple changes, such as assigning custom IP addresses to multiple hosts for a VLAN overlay.
-a : Use this parameter with the --config option to perform unattended changes. Using this option will not prompt for confirmation before performing an action.
--help : Display the online help.
Examples
Run DCA Setup in interactive mode:
# dca_setup
Run DCA Setup with a configuration file, in unattended mode:
# dca_setup -c my_config.cnf -a

2. dca_shutdown : The DCA shutdown utility will safely power off all servers in a DCA.
Synopsis
dca_shutdown { -f hostfile | -h hostname } [ --ignoredb ] [ --password= password ] [ --passfile= password_file ] [--statusonly]
dca_shutdown
dca_shutdown --help
Description
The dca_shutdown utility will safely power down all servers in a DCA. The utility can be run with no parameters, and will use the system inventory generated by DCA Setup during an installation or Regenerate DCA Config Files operation. If the utility is run with a hostfile or hostname specified, only those hosts will be shutdown. This utility will not shut down the administration, Interconnect or aggregation switches.
The utility should be run as the user root. Prior to running the dca_shutdown, the following steps should be performed to ensure a clean shutdown:
1. Stop Greenplum Database:
$ gpstop -af
2. Stop Command Center:
$ gpcmdr --stop
3. Stop health monitoring as the user root:
$ su -
# dca_healthmon_ctl -d
Options
-?, --help
Print usage and help information.
-i, --ignoredb
Do not check if Greenplum Database, health monitoring or Command Center are running. Shut down all servers immediately.
-h, --host hostname
Perform a shutdown on the host specified.
-f, --hostfile hostfile
Perform a shutdown on the hosts listed in the hostfile. This option can not be used with the --host option.
-p, --password password
Specify a password to connect to the server’s IPMI (iDRAC) to perform the shutdown. The password is originally set during installation with DCA Setup - if an installation through DCA Setup has never been run, the user will be prompted for a password.
-s, --passfile password_file
Specify a file containing the password to use to connect to the server’s IPMI (iDRAC) to perform the shutdown. This file is generated during installation with DCA Setup, and is located in /opt/dca/etc/ipmipasswd.
-o, --statusonly
Print the power status (ON | OFF) of all servers. This will not power off any servers.
Examples
Shut down all servers in a DCA:
# dca_shutdown
Shut down servers listed in the file hostfile:
dca_shutdown -f /home/gpadmin/gpconfigs/hostfile

3. dca_check : Validate hardware and operating system settings.
Synopsis
dcacheck { -f hostfile | -h hostname } { --stdout | --zipout } [--config config_file ]
dcacheck --zipin dcacheck_zipfile
dcacheck -?
Description
The dcacheck utility validates DCA operating system and hardware configuration settings. The dcacheck utility can use a host file or a file previously created with the --zipout option to validate settings. At the end of a successful validation process, DCACHECK_NORMAL message displays. If DCACHECK_ERROR displays, one or more validation checks failed. You can also use dcacheck to gather and view platform settings on hosts without running validation checks. 
Greenplum recommends that you run dcacheck as the user root. If you do not run dcacheck as root, the utility displays a warning message and will not be able to validate all configuration settings. Only settings will be validated. Running dcacheck with no parameters validates settings in the following file:
/opt/dca/etc/dcacheck/dcacheck_config
The specific configuration parameters that are validated depends on the DCA software release.
Options
--config config_file
The name of a configuration file to use instead of the default file
/opt/dca/etc/dcacheck/dcacheck_config.
-f hostfile
The name of a file that contains a list of hosts dcahceck uses to validate settings. This file should contain a single host name for all hosts in the DCA.
-h hostname
The name of a host that dcacheck will use to validate platform-specific settings.
--stdout
Display collected host information from dcacheck. No checks or validations are performed.
--zipout
Save all collected data to a .zip file in the current working directory. dcacheck automatically creates the .zip file and names it dcacheck_timestamp.tar.gz. No
checks or validations are performed.
--zipin file
Use this option to decompress and check a .zip file created with the --zipout option. dcacheck performs validation tasks on the file you specify in this option.
-?
Print the online help.
Examples
Verify and validate the DCA settings on specific servers:
# dcacheck -f /home/gpadmin/gpconfigs/hostfile
Verify custom settings on all DCA servers:
# dcacheck --config my_config_file

4. dca_healthmon_ctl :  Control the healthmond service on a DCA.
Synopsis
dca_healthmon_ctl { -e | -d | -s } [ -n ]
dca_healthmon_ctl --help
Description
The dca_healthmon_ctl utility controls the DCA health monitoring service. This utility is used to manually enable, disable, or check the status of health monitoring. The health monitoring service must be stopped during most service activities to avoid false call home messages. This utility must be run as the user root.
Options
-e, --enable
Enable health monitoring services on the DCA.
-d, --disable
Disable health monitoring services on the DCA.
-s, --status
Query the status of health monitoring services on the DCA.
-n, --node mdw|smdw
Run command on a specific server, mdw or smdw. Normal operation runs the command on both mdw and smdw. This option must be used with the --enable or --disable parameters.
-h, -?, --help
Print the online help.
Examples
Stop heath monitoring services on a DCA:
# dca_healthmon_ctl -d
Start health monitoring services on the Primary Master server, mdw:
# dca_healthmon_ctl -e -n mdw

5. dca_blinker : Identify a DCA server by flashing it’s marker LED.
Synopsis
dca_blinker { -h hostname | -f hostfile } [ -a ON | OFF ] [ -t interval ]
dca_blinker -?
Description
The dca_blinker utility turns on/off the marker LED on a DCA server. This utility can be used from any server in a DCA. The default flash interval 15 minutes. This utility must be run as the user root.
Options
-h hostname
Specify the host to flash the marker LED. Multiple hosts can be specified.
-f hostfile
Specify a list of hosts to flash the marker LED.
-a ON|OFF
Set the LED flash to ON or OFF.
-t interval
Interval in seconds to flash the server marker LED. Default interval is 15 minutes.
Examples
Flash the marker LED on sdw1 for 20 seconds:
dca_blinker -h sdw1 -a ON -t 20
Turn off the flashing LED on sdw1:
dca_blinker -h sdw1 -a OFF

6. gppkg : Installs Greenplum Database extensions such as pgcrypto, PL/R, PL/Java, PL/Perl, and
PostGIS, along with their dependencies, across an entire cluster.
Synopsis
gppkg [-i package | -u package | -r name-version | -c]
[-d master_data_directory] [-a] [-v]
gppkg --migrate GPHOME_1 GPHOME_2 [-a] [-v]
gppkg [-q | --query] query_option
gppkg -? | --help | -h
gppkg --version
Description
The Greenplum Package Manager (gppkg) utility installs Greenplum Database
extensions, along with any dependencies, on all hosts across a cluster. It will also
automatically install extensions on new hosts in the case of system expansion and
segment recovery.
First, download one or more of the available packages from the EMC Download Center
then copy it to the master host. Use the Greenplum Package Manager to install each
package using the options described below.
Note: After a major upgrade to Greenplum Database, you must download and install all
extensions again.
These packages are available for download from the EMC Download Center.
http://support.emc.com
 PostGIS
 PL/Java
 PL/R
 PL/Perl
 Pgcrypto
Options
-a (do not prompt)
Do not prompt the user for confirmation.
-c | --clean
Reconciles the package state of the cluster to match the state of the master host. Running this option after a failed or partial install/uninstall ensures that the package installation state is consistent across the cluster.
-d master_data_directory
The master data directory. If not specified, the value set for $MASTER_DATA_DIRECTORY will be used.
-i package | --install=package
Installs the given package. This includes any pre/post installation steps and installation of any dependencies.
--migrate GPHOME_1 GPHOME_2
Migrates packages from a separate $GPHOME. Carries over packages from one version of Greenplum Database to another.
For example: gppkg --migrate /usr/local/greenplum-db-4.2.2.4/usr/local/greenplum-db-4.2.3.2
This option is automatically invoked by the installer during minor upgrades. This option is given here for cases when the user wants to migrate packages manually. Migration can only proceed if gppkg is executed from the installation directory to which packages are being migrated. That is, GPHOME_2 must match the $GPHOME from which the currently executing gppkg is being run.
-q | --query query_option
Provides information specified by query_option about the installed packages. Only one query_option can be specified at a time. The following table lists the possible values for query_option. <package_file> is the name of a package.
-r name-version | --remove=name-version
Removes the specified package.
-u package | --update=package
Updates the given package.
--version (show utility version)
Displays the version of this utility.
-v | --verbose
Sets the logging level to verbose.
-? | -h | --help
Displays the online help.
Comments