Command to invoke the Enterprise Manager Ops Center.
The Enterprise Manager Ops Center provides a set of modes to manage the Oracle Enterprise Manager Ops Center environment. Each mode has a set of subcommands to manage the objects controlled by the mode.
Type the oc command on a server's command-line to invoke the command-line interface. Type exit to stop the command-line interface and to return to the server's command-line. The first time that the CLI is started, files are compiled and cached, which causes a delay. Subsequent uses are not delayed.
To customize the command-line interface, use the setenv command. You can see the available options using the printenv command.
connect [-h hostname] [-u username] [-p password|-p @filename][-n port][-a|--accept-all-certificates]Authenticates the connection between Enterprise Manager Ops Center and the Enterprise Controller. The host is the system on which the Enterprise Controller is running. Use the -a| --accept-all-certificcates option to accept all certificates without receiving any confirmation message.
disconnectCloses the connection between the Enterprise Manager Ops Center and the Enterprise Controller.
endTerminates the mode and returns to the default command-line.
help [-l]Displays usage information about the subcommands. The -l option includes detailed usage information.
pingChecks connectivity to the Enterprise Controller.
printenvDisplays the user configuration.
record filenameCopies all console inputs and outputs to the file. Issue the command without a file name to stop the recording.
setenvSets the user environment in the following ways:
log_levelhistory_length integerdebugpagercontinue_on_error TRUE|FALSEtext_wrap_width integeroutput_format=text|parsablesource filenameSpecifies the file as the source of an operation when executing commands. Use this file for information that is shared by more than one script or to keep secure information separate from a script.
versionDisplays the version of the CLI, the Oracle Enterprise Manager Ops Center software, the Java™ SE Runtime Environment, and the Java HotSpot™ Server VM software.
The following commands can be used from within any mode at any time or from the main command-line.
history [-n number]Lists the most recent commands. Use the -n option to limit the number of commands. The history includes a command number for the sequence. To repeat a command, enter the ! character with the command number and press the Tab key, as shown in the following example:
history -n 5 495 version 496 man history 497 help history 498 help -l history #!495 <Tab> #version
man modenameDisplays the man page for the specified mode. The syntax and usage for all mode subcommands are included in the man page. To see a list of man pages, enter the command and press the Tab key.
wait [-i|--jobid jobID] [-r|--runid runID] [-a|--all] [-n|--maxwait max_wait]Causes the CLI to wait until either the most recent job or the specified job finishes before executing the next command. You can identify a job by its jobID or by its runID. This command is used in scripts. To interrupt a wait operation interactively, press Ctrl+C.
For any main or mode command, you can constrain the output by appending one of the following filters to the command:
|grep regexp to filter by the regular expression.
|countinteger to display only the number of output lines.
|teefilename to write the output to a file.
For example, to create a file of jobs:
#localhost/jobs> list | tee /var/tmp/todays_jobs.txt
The Enterprise Manager Ops Center provides a set of modes. Each mode operates on a type of object or performs a particular action. Within these modes, subcommands manage and control the actions of the mode. The subcommands of one mode do not operate in another mode.
The Enterprise Manager Ops Center supports the following modes:
Certificates
Collisions
Controllers
Credentials
Deploy
Deploy-setup
Discover
Fwimage
Fwprofile
Gear
Groups
Incidents
Jobs
Notifications
Osimage
Osprofile
Stats
Update
User
Virtualization
For operations that are performed frequently, you can write scripts that enter modes, perform operations, and then exit modes. The following example shows a script named update.xvm that writes the inventory of the Finance server to a file. The command uses a password file, /tmp/p, which is identified by the its leading character, @.
connect finance_svr -u zz3282134 -p @tmp/p update csv_inventory -h finance_svr -f ~/inventory_latest.csv wait end
To execute the file at any time, issue the following command:
oc < update.xvm
or
oc --cmdfile update.xvm
Within a script, you can use the source command to run another script that is external to your script.
To execute a subcommand of another mode, use its full command-line path:
notifications cli.jobs.list
certificates(1), collisions(1), controllers(1), credentials(1), deploy(1), deploy-setup(1), discover(1), fwimage(1), fwprofile(1), gear(1), groups(1), incidents(1), jobs(1), monitoring(1), networks(1), notifications(1)osimage(1) osprofile(1), reports(1), serverpools(1), stats(1), update(1), user(1), virtualization(1).