A Command Line Administration

You can manage the Oracle Enterprise Manager Ops Center Enterprise Controller, Proxy Controller, and Agent Controller from the command line.

The following information is included in this chapter:

About Configuring the Enterprise Controller: ecadm

You can configure the Enterprise Controller using the ecadm command.

The ecadm command helps to configure, unconfigure, and perform administrative tasks on the Oracle Enterprise Manager Ops Center Enterprise Controller.

The following topics are covered:

Synopsis for ecadm

Lists the synopsis for the Enterprise Controller.

Oracle Solaris OS

/opt/SUNWxvmoc/bin/ecadm -V
/opt/SUNWxvmoc/bin/ecadm [ -h | --help ]
/opt/SUNWxvmoc/bin/ecadm subcommand [ options ]

Linux OS

/opt/sun/xvmoc/bin/ecadm -V
/opt/sun/xvmoc/bin/ecadm [ -h | --help ]
/opt/sun/xvmoc/bin/ecadm subcommand [ options ]

Options for ecadm

Lists the common options for the Enterprise Controller.

The following common options are supported:

-h| --help: Displays the usage synopsis for ecadm.

-V| --version: Displays the version of Oracle Enterprise Manager Ops Center.

Subcommands for ecadm

Lists the subcommands for the Enterprise Controller.

The subcommands of ecadm are as follows:

start

Starts the Enterprise Controller services running on the host.

stop

Stops the Enterprise Controller services running on the host.

status

Displays the status of the Enterprise Controller services. Displays either online or offline to the standard output and sets the exit status to reflect the Enterprise Controller service state.

configure

Performs configuration tasks for the Enterprise Controller services. Registers the Enterprise Controller with My Oracle Support.

unconfigure

Performs the inverse operation of configuring the Enterprise Controller. Deregisters the Enterprise Controller.

backup

Creates a backup archive of the state data of the Enterprise Controller. This command does not back up any installed software.

restore

Restores the state data of an Enterprise Controller from a backup archive. If a new system is being used, the system must have the same host name as the original Enterprise Controller. After the successful completion of this command, the Enterprise Controller is in the same operational state that existed at the time of the backup.

If the registration of the Enterprise Controller to My Oracle Support is invalidated with the ecadm unconfigure command, any backup archives created during the time the Enterprise Controller was registered become unusable. The Enterprise Controller is no longer able to communicate with My Oracle Support, and the asset data shared between the Enterprise Controller and the hosted servers lose their synchronization.

verify-db

Verifies that the database used for the Enterprise Controller data persistence is available, reachable, and the schemas are set up with the proper permissions.

change-db-password

Changes the Enterprise Controller password for the application or read only database schema that is used by Oracle Enterprise Manager Ops Center database password for the local or remote database. The Enterprise Controller services are restarted after using this command.

defrag-db

Defragments the embedded database to increase free space and improve performance.

maintenance

Changes the state of the database to maintenance state.

migrate

Moves Enterprise Controller data persistence from a local database to a customer-managed database, then removes the local database and the local database server binaries from the Enterprise Controller. The database must be installed in the destination location before beginning this procedure. The Enterprise Controller is shutdown and is restarted on successful completion.

sqlplus

Opens a sqlplus console to the underlying database.

ha-status

Checks the status of the Oracle Clusterware Enterprise Controller resource.

ha-configure-primary

Configures the system as the primary Enterprise Controller in an Oracle Clusterware framework.

ha-configure-standby

Configures the system as a standby Enterprise Controller in an Oracle Clusterware framework.

ha-modify-resource

Modifies the Enterprise Controller Clusterware resource attributes. To modify the Clusterware resource attributes, edit the /var/opt/sun/xvm/ha/EnterpriseController_HA_clusterware.properties file with the appropriate changes, and run this command to take effect.

ha-relocate

Switches from the currently active Enterprise Controller node to a different node.

ha-start

Starts the Enterprise Controller Clusterware resource on one of the Clusterware nodes. Starting the Enterprise Controller Clusterware resource causes the Enterprise Controller services to start.

ha-stop-no-relocate

Stops the Enterprise Controller Clusterware resource. Stopping the Enterprise Controller resource causes the currently active node hosting the Enterprise Controller services to be stopped.

ha-unconfigure-primary

Removes the last node hosting the Enterprise Controller in an Oracle Clusterware framework.

ha-unconfigure-standby

Removes a Enterprise Controller node from the Oracle Clusterware framework.

rebuild-db-index

Checks the indexes with more than 1 million leaf rows and coalesces the index if the deleted leaf rows are between 10-15% of the index size or rebuilds the index if the deleted leaf rows of the index are more than 50% of the total index leaf rows. This command can only be executed on an Enterprise Controller with a co-located database and can be used only when the Enterprise Controller is in the maintenance mode.

Subcommand Options for ecadm

Lists the subcommand options for the Enterprise Controller.

Common options for all subcommands:

-h| --help: Displays the usage synopsis for the subcommand.

-v| --verbose: Displays verbose error and informational messages.

-l| --logfile <logfile>: Captures any output from ecadm in the <logfile>.

start

Enter ecadm start [ -h | --help ] [ -v | --verbose ] [ -c | --cluster ] [ -t | --temporary ] [ -w | --wait ] [ -l | --logfile <logfile> ].

-c|--cluster: Cluster environment.

-w| --wait: ecadm does not exit until all services have been started.

-t| --temporary: The state change is made temporary until next reboot.

stop

Enter ecadm stop [ -h | --help ] [ -v | --verbose ] [ -c | --cluster ] [ -t | --temporary ] [ -w | --wait ] [ -l | --logfile <logfile> ].

-c|--cluster: Cluster environment.

-w| --wait: ecadm does not exit until all services have been stopped.

-t| --temporary: The state change is made temporary until next reboot.

status

Enter ecadm status [ -h | --help ].

configure

Enter ecadm configure [ -h | --help ] [ -f | --config <config-file>] [ -p | --proxy ] [ -P | --noproxy ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

-f| --config <config-file>: Uses the contents of <config-file> to register the Proxy Controller with My Oracle Support.

-p| --proxy: By default, enables the local Proxy Controller after the Enterprise Controller is configured.

-P| --noproxy: The local control proxy is not enabled.

Note:

Ensure that the file permission for the configuration file properties is set to 400 because it contains the Online Account user name and password. The configuration file must not be accessible to unauthorized users.

unconfigure

Enter ecadm unconfigure [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

backup

Enter ecadm backup [ -o | --output <backup-file> ] [ -t | --tag <tag> ] [ -d | --description <description> ] [ -r | --remotedb ] [ -T | --tempdir <temp-dir> ] [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

-o | --output <backup-file>: Stores the backup archive in tar format in <backup-file>. Do not specify the path inside the xvm install directories (/opt/*xvm*). Default: /var/tmp/sat-backup-<date>-<time>.tar

-t | --tag <tag>: Stores the string <tag> as a property of the backup archive which is displayed by restore operation when referencing the <backup-file>.

-d | --description <description>: Stores the string <description> as a descriptive property of the backup archive (the description is informational and it is displayed during restore operation).

-r|--remotedb: If Enterprise Controller uses a remote database, export the schema to a file on the database server. This option must be specified if the Enterprise Controller uses a remote database, otherwise data is not exported from the database.

-T | --tempdir <temp-dir>: Uses <temp-dir> instead of the temporary directory in /var/tmp for intermediate storage needs during the backup. This temporary directory is required to hold a large quantity of data during the backup operation.

restore

Enter ecadm restore -i | --input <backup-file> [ -r | --remotedb ] [ -d | --tempdir <temp-dir> ] [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile>] .

-i | --input <backup-file>: Restores state data from <backup-file> which is the archive created by the ecadm backup operation. This parameter is required.

-r|--remotedb: If EC uses a remote database, export the schema to a file on the database server. This option must be specified if the Enterprise Controller uses a remote database, otherwise data is not exported from the database.

-d | --tempdir <temp-dir>: Uses <temp-dir> instead of the temporary directory in /var/tmp for intermediate storage needs during the restore. This temporary directory is required to hold a large quantity of data during the restore operation.

verify-db

Enter ecadm verify-db [ -v | --verbose ].

change-db-password

Enter ecadm change-db-password -p| --passwordfile <password-file> [ -v | --verbose ].

-p| --password-file <password-file>: Specifies the file containing the new password.

-r| --as_read_only_user: Specifies if the operation is done for a read only user. If this option is used, the password for the read only user is specified in the <password file>, and the read only user is the target of the change.

defrag-db

Enter ecadm defrag-db [ -T | --tempdir <temporary directory> ].

-T| --tempdir <temporary directory>: Specifies a different temporary directory to use for the defragmentation.

maintenance

Enter ecadm maintenance [ -h | --help ] [ -v | --verbose ] [ -c | --cluster ] [ -r | --reason <reason-file>] [ -t | --temporary ] [ -w | --wait ] [ -l | --logfile <logfile> ].

-c| --cluster: Cluster environment.

-r| --reason <reason-file>: Record reason for shutdown from message in <reason-file>.

-w| --wait: ecadm does not exit until all services have been stopped.

-t| --temporary: The state change is made temporary until next reboot.

migrate

Enter ecadm migrate -r | --remoteDBprops <credentials-file> [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile>].

-r| --remoteDBprops <credentials-file>: Specify the file containing credentials and url for the target database.

sqlplus

Enter ecadm sqlplus [ -h | --help ] [ -r | --as_read_only_user] [ -c | --command] [ -f| --filedbprop <db.properties file] [ -p | --propfile <dbpw.properties file] [ -d | --directory <directory to run in> ].

-r| --as_read_only_user: Logs into the database as the read only user.

-c| --command: Reads the input stream commands that are passed to sqlplus.

-f| --filedbprop <db.properties file>: Contains the properties to get the schema name and database URL to set the database properties. The default location of db.properties file is /var/opt/sun/xvm/db.properties

-p| --propfile <dbpw.properties file>: Contains the passwords for the schema names in db.properties. The dbpw.properties file is found by default in /var/opt/sun/xvm/dbpw.properties

-d| --directory <directory to run in>: Uses the directory passed in as the working directory for the sqlplus session.

ha-status

Enter ecadm ha-status [ -h | --help ] [ -v | --verbose ] [ -d | --display] [ -l | --logfile <logfile> ].

-d| --as_read_only_user: Displays full High Availability status info.

ha-configure-primary

Enter ecadm ha-configure-primary [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

ha-configure-standby

Enter ecadm ha-configure-standby [ -h | --help ] [ -p | --credentialsfilename <credentials-file> ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

-p| --credentialsfilename<credentials-file>: Specifies the file containing the user name and password for privileged access. The first line of the file must contain the user name in this format: username=<user>. The second line of the file must contain the password in this format: password=<password>.

ha-modify-resource

Enter ecadm ha-modify-resource [ -h | --help ] [ -p | --credentialsfilename <credentials-file> ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

-p| --credentialsfilename <credentials-file>: Specifies the file containing the user name and password for privileged access. The first line of the file must contain the user name in this format: username=<user>. The second line of the file must contain the password in this format: password=<password>.

ha-relocate

Enter ecadm ha-relocate [ -h | --help ] [ -n | --node <standby node> ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

-n| --node <standby node>: Relocates to node in <standby node>.

ha-start

Enter ecadm ha-start [ -h | --help ] [ -n | --node <standby node> ] [ -v | --verbose ] [ -l | --logfile <logfile>].

-n| --node <standby node>: Relocates to node in <standby node>.

ha-stop-no-relocate

Enter ecadm ha-stop-no-relocate [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

ha-unconfigure-primary

Enter ecadm ha-unconfigure-primary [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

ha-unconfigure-standby

Enter ecadm ha-unconfigure-standby [ -h | --help ] [ -n | --node <standby node>] [ -v | --verbose ] [ -l | --logfile <logfile>].

-n| --node <standby node>: Unconfigures the standby node when run from another cluster node. Use this option when the standby node is down.

Exit Status for ecadm

The exit status displays the status of the Enterprise Controller services.

The status currently displays either offline or online to the standard output. The exit status displays one of the following codes:

0: Online

2: Offline (only for status subcommand)

1: Error occurred during processing

About Configuring the Proxy Controller: proxyadm

You can configure the Proxy Controller using proxyadm command.

The proxyadm command helps to start, stop, configure and unconfigure the Oracle Enterprise Manager Ops Center Proxy Controller services.

The following topics are covered:

Synopsis

Lists the synopsis for the Proxy Controller.

Oracle Solaris OS

/opt/SUNWxvmoc/bin/proxyadm -V
/opt/SUNWxvmoc/bin/proxyadm [ -h | --help ]
/opt/SUNWxvmoc/bin/proxyadm subcommand [ options ]

Linux OS

/opt/sun/xvmoc/bin/proxyadm -V
/opt/sun/xvmoc/bin/proxyadm [ -h | --help ]
/opt/sun/xvmoc/bin/proxyadm subcommand [ options ]

Options for proxyadm

Lists the common options for the Proxy Controller.

The proxyadm command supports the following options:

-h| --help: Displays the usage synopsis for proxyadm.

-V: Displays the version of Oracle Enterprise Manager Ops Center.

Subcommands for proxyadm

There are different subcommands used for the Proxy Controller.

The proxyadm command includes the following subcommands:

start

Starts the Proxy Controller services running on the host.

stop

Stops the Proxy Controller services running on the host.

status

Displays the online or offline status of the Proxy Controller services to the standard output, and sets the exit status to reflect the Proxy Controller service state.

configure

Performs configuration tasks for the Proxy Controller services.

You can set the following classes of configuration information:

  • Registering the Proxy Controller with the Enterprise Controller.

  • Configuring the type of DHCP server that the Proxy Controller runs and the parameters for that DHCP server.

unconfigure

Performs the inverse operation of configuring the Proxy Controller. Deregisters and unconfigures the connection between the Proxy Controller and the Enterprise Controller it is associated with.

backup

Creates a backup archive of the state data of the Proxy Controller. This command does not back up any installed software.

restore

Restores the state data of the Proxy Controller from a backup archive.

update

Updates the URL property of a remote Proxy Controller to point to the new IP address of the Enterprise Controller, if the Enterprise Controller is restored on a new system.

Subcommand Options for proxyadm

There are different subcommand options used for the Proxy Controller.

The following common options are supported for all the subcommands:

-h| --help: Displays the usage synopsis for that subcommand.

-v| --verbose: Displays verbose error and informational messages.

start

Enter proxyadm start [ -h | --help ] [ -v | --verbose ] [ -w | --wait ] [ -t | --temporary ] [ -l | --logfile <logfile> ].

-w| --wait: proxyadm does not exit until all the services are started.

-l| --logfile <logfile>: Captures any output from proxyadm in the logfile.

-t| --temporary: The state change is made temporary until next reboot.

stop

Enter proxyadm stop [ -h | --help ] [ -v | --verbose ] [ -w | --wait ] [ -t | --temporary ] [ -l | --logfile <logfile> ].

-w| --wait: proxyadm does not exit until all the services are stopped.

-l| --logfile <logfile>: Captures any output from proxyadm in the logfile.

-t| --temporary: The state change is made temporary until next reboot.

status

Enter proxyadm status [ -h |--help ].

configure

Enter proxyadm configure [ -h | --help ] [ -v | --verbose ] [ -a | --proxy-ip ] [ -u | --user <user name> ] [ -p | --passwordfile ] [ -t | --tokenfile <password-file> ] [ -x | --proxy <host name>[:<port>] ] [ -U | --proxy-user <proxy user name> ] [ -P | --proxy-passwordfile <password-file> ] [ -a | --proxy-ip ].

-s | --satellite <Enterprise Controller>: Specifies the Enterprise Controller with which to register the Proxy Controller. Requires the -u and -p options.

-u | --user <user name>: Specifies the Enterprise Controller administrator user name.

-p| --passwordfile <passwordfile>: Specifies a filename containing the password for the Enterprise Controller administrator.

(Optional) -t| --tokenfile <autoregistration_tokenfile>: Specifies an autoregistration token stored in a file. This is used as an alternative for Enterprise Controller administrator user name and password.

(Optional) -x| --proxy <host name>[:<port>]: If an HTTPS proxy is required to reach the Enterprise Controller, specify the <host name> for that proxy. Specifying the IP port is optional. The default proxy port is 8080.

(Optional) -U | --proxy-user <proxy user name>: Use this option if a proxy requires a user name for authentication.

(Optional) -P | --proxy-passwordfile <password-file>: Uses the password in <password-file> for proxy authentication.

(Optional) -a | --proxy-ip: Explicitly enter the IP address of the control proxy.

Note:

The password file must be secured to prevent unauthorized users from examining the file. The file permission must be set to 400.

unconfigure

Enter proxyadm unconfigure [ -h | --help ] [ -k| --keep ].

-k|--keep: Keeps the local Proxy Controller database.

backup

Enter proxyadm backup [ -o | --output <backup-file> ] [ -t | --tag <tag> ] [ -d | --description <description> ] [ -T | --tempdir <temp-dir> ] [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ].

-o | --output <backup-file>: Stores the backup archive in tar format in <backup-file>. Do not specify the path inside the xvm install directories (/opt/*xvm*). Default: /var/tmp/proxy-backup-<date>-<time>.tar

-t | --tag <tag>: Stores the string <tag> as a property of the backup archive which is displayed by restore operation when referencing the <backup-file>.

-d | --description <description>: Stores the string <description> as a descriptive property of the backup archive (the description is informational and it is displayed during restore operation).

-T | --tempdir <temp-dir>: Uses <temp-dir> instead of the temporary directory in /var/tmp for intermediate storage needs during the backup. This temporary directory is required to hold a large quantity of data during the backup operation.

restore

Enter proxyadm restore [-i | --input <backup-file>] [ -l | --logfile <logfile>] [ -T | --tempdir <temp-dir> ] [ -v | --verbose ].

-i | --input <backup-file>: Restores state data from <backup-file> which is the archive created by the proxy backup operation. This parameter is required.

-T | --tempdir<temp-dir>: Uses <temp-dir> instead of the temporary directory in /var/tmp for intermediate storage needs during the restore. This temporary directory is required to hold a large quantity of data during the restore operation.

update

Enter proxyadm update -s|--satellite-ip <ip address of EC>

-s|--satellite-ip <ip address of EC>: Uses the IP address of the Enterprise Controller to connect the remote Proxy Controller to the Enterprise Controller.

Exit Status for proxyadm

The exit status displays the status of the proxy services.

The states currently display either offline or online on the standard output. The exit status displays one of the following codes:

0: Online

2: Offline (only for status subcommand)

1: Error occurred during processing

About Configuring the Agent Controller: agentadm

You can configure the Agent Controller using agentadm command.

The agentadm command helps to manage the Oracle Enterprise Manager Ops Center agents such as registering the Agent Controller to the proxy and unconfiguring the agents.

The following topics are covered:

Synopsis for agentadm

Lists the synopsis for the Agent Controller.

Oracle Solaris OS

/opt/SUNWxvmoc/bin/agentadm
/opt/SUNWxvmoc/bin/agentadm [ -h | --help ]
/opt/SUNWxvmoc/bin/agentadm subcommand [ options ]

Linux OS

/opt/sun/xvmoc/bin/agentadm -V
/opt/sun/xvmoc/bin/agentadm [ -h | --help ]
/opt/sun/xvmoc/bin/agentadm subcommand [ options ]

Usage

agentadm [-V | --version ] [ -K | --property-keys <file>] [ -q | --quiet ] [ -v | --verbose ] [ -f | --force ] [ -n | --norefresh ] [ -o | --output-file ] [ -h | --help]

agentadm subcommand [ options ]

Options for agentadm

Lists the common options for the Agent Controller.

The following common options are supported:

-K| --property-keys <file>: The properties filename for the subcommands.

-V| --version: Displays the version number of the Agent Controller software.

-h| --help: Displays the usage synopsis for all configuration steps supported by agentadm.

-v| --verbose: Display verbose error and informational messages. Use multiple occurrences of this option to increase the verbosity level.

-q| --quiet: Does not display anything and returns only the return code.

-f| --force: Ignores non critical errors during steps operations.

-n| --norefresh: Does not overwrite the existing operation.

-o| --output-file: Sends the output to the specified logfile.

Subcommands for agentadm

There are different subcommands used for the Agent Controller.

The subcommands of agentadm are as follows:

start

Starts the Agent Controller services running on the host.

stop

Stops the Agent Controller services running on the host.

status

Displays the online or offline status of the Agent Controller services to the standard output.

configure

Performs configuration tasks for the Agent Controller services.

unconfigure

Performs the inverse operation of configuring the Agent Controller.

usage

Equivalent to [ -h | --help ]

Subcommand Options for agentadm

There are different subcommand options used for the Agent Controller.

The following are the subcommand options for agentadm:

start

Enter agentadm start.

stop

Enter agentadm stop.

status

Enter agentadm status [ -h |--help ]

configure

The configuration step consists of:

  • sc-console registration of the agent to proxy.

  • scn-agent cacao instance creation.

  • uce-agent cacao instance creation.

  • Registration of the agent's products to the proxy.

The registration of the agent to the proxy is as follows: agentadm configure [ -u | --user <user name> ] [ -p | --passwordfile<password-file> ] [ -a | --agent-ip <IP address> ] [ -t | --token <tokenfilename> ] [ -x | --proxy <URI> ] [ -I | --non-interactive ] [ -k | --keep-connection ]

-u | --user <user name>: The Online Account user name.

-p | --passwordfile <passwordfile>: Filename with the Online Account credentials.

-a | --agent-ip <IP address>: Specify the IP address to be used during registration.

-t | --token <tokenfilename>: Filename containing auto registration token.

-x | --proxy <URI>: URI of the proxy to be registered.

-I | --non-interactive: Launch sc-console in non-interactive mode (without -i). Default is interactive mode.

-k | --keep-connection: Do not re-register to proxy if the connection exists.

unconfigure

Enter agentadm unconfigure