This chapter explains how to manage the Oracle Enterprise Manager Ops Center Enterprise Controller, Proxy Controller, and Agent Controller from the command line.
The following information is included:
The ecadm
command helps to configure, unconfigure, and perform administrative tasks on the Oracle Enterprise Manager Ops Center 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 ]
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.
The subcommands of ecadm are as follows:
Starts the Enterprise Controller services running on the host.
Stops the Enterprise Controller services running on the host.
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.
Performs configuration tasks for the Enterprise Controller services. Registers the Enterprise Controller with My Oracle Support.
Performs the inverse operation of configuring the Enterprise Controller. Deregisters the Enterprise Controller.
Creates a backup archive of the state data of the Enterprise Controller. This command does not back up any installed software.
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.
Verifies that the database used for the Enterprise Controller data persistence is available, reachable, and the schemas are setup with the proper permissions.
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.
Changes the state of the database to maintenance state.
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.
Opens a sqlplus console to the underlying database.
Checks the status of the Oracle Clusterware Enterprise Controller resource.
Configures the system as the primary Enterprise Controller in an Oracle Clusterware framework.
Configures the system as a standby Enterprise Controller in an Oracle Clusterware framework.
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.
Switches from the currently active Enterprise Controller node to a different node.
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.
Stops the Enterprise Controller Clusterware resource. Stopping the Enterprise Controller resource causes the currently active node hosting the Enterprise Controller services to be stopped.
Removes the last node hosting the Enterprise Controller in an Oracle Clusterware framework.
Removes a Enterprise Controller node from the Oracle Clusterware framework.
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>
.
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.
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.
Enter ecadm status [ -h | --help ]
.
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.Enter ecadm unconfigure [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ].
Enter ecadm backup [ -o | --output <backup-file> ] [ -t | --tag <tag> ] [ -d | --description <description> ] [ -r | --remotedb ] [ -c | --configdir <config-dir>] [ -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.
-c | --configdir
<config-dir>
: <config-dir>
is an alternative collection of backup modules when performing the backup. ecadm backup is modular in design and executes a set of backup tasks in the configuration directory. This option provides a means to use an alternate set of modules to produce a backup archive in a specialized way.
-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.
Enter ecadm restore -i | --input <backup-file> [ -c | --configdir <config-dir>] [ -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.
-c | --configdir
<config-dir>
: <config-dir>
is an alternative collection of restore modules when performing the backup. ecadm restore is modular in design and executes a set of restore tasks in the configuration directory. This option provides a means to use an alternate set of modules to restore a backup archive in a specialized way.
-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.
Enter ecadm verify-db [ -v | --verbose ]
.
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.
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.
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.
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 dabatase 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.
Enter ecadm ha-status [ -h | --help ] [ -v | --verbose ] [ -d | --display] [ -l | --logfile <logfile> ]
.
-d| --as_read_only_user
: Displays full High Availability status info.
Enter ecadm ha-configure-primary [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ]
.
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>
.
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>
.
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>
.
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>
.
Enter ecadm ha-stop-no-relocate [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ]
.
Enter ecadm ha-unconfigure-primary [ -h | --help ] [ -v | --verbose ] [ -l | --logfile <logfile> ]
.
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.
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
The proxyadm
command helps to start, stop, configure and unconfigure the Oracle Enterprise Manager Ops Center Proxy Controller services.
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 ]
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.
The proxyadm
command includes the following subcommands:
Starts the Proxy Controller services running on the host.
Stops the Proxy Controller services running on the host.
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.
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.
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.
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.
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.
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.
Enter proxyadm status [ -h |--help ]
.
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 ]
.
-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.Enter proxyadm unconfigure [ -h | --help ] [ -k| --keep ]
.
-k|--keep
: Keeps the local Proxy Controller database.
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.
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 ]
agentadm [-V | --version ] [ -K | --property-keys <file>] [ -q | --quiet ] [ -v | --verbose ] [ -f | --force ] [ -n | --norefresh ] [ -o | --output-file ] [ -h | --help]
agentadm subcommand [ options ]
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.
The subcommands of agentadm are as follows:
Starts the Agent Controller services running on the host.
Stops the Agent Controller services running on the host.
Performs configuration tasks for the Agent Controller services.
Performs the inverse operation of configuring the Agent Controller.
Equivalent to [ -h | --help ]
Enter agentadm start
.
Enter agentadm stop
.
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.
Enter agentadm unconfigure