Database Reference
In-Depth Information
Chapter 4
Working at the Command Line
EM CLI is ideally suited for shell scripts, but it also simplifies tasks that are ordinarily performed in the console.
For instance, removing an EM agent and its related targets through the console can be quite trying. With EM CLI,
you issue a one-line command and the same tasks execute quickly and completely from the command line.
This chapter will introduce you to some of the basics of EM CLI at the command line and then illustrate several
ways you can apply EM CLI to administering your environment more quickly—without all the mouse clicks required
to perform the same tasks in the console.
We often associate the term “command line” with Unix, and that's applicable here too, but do remember that
since EM CLI is a Java application it can be run on any platform. EM CLI runs the same whether you're logged into a
server or executing the commands from your desktop.
Start an EM CLI Session
Although each CLI command is run on a separate line, when logging into EM CLI a single session is established for all
subsequent statements. The login verb establishes a connection to the OMS server and validates the user before any
work starts. You may either enter your password on the command line (not recommended for interactive sessions) or
wait to be prompted for the password during the login process.
The sync command ensures that your run-time execution uses the current verb definitions available in the
management server's software library. This is particularly important after you've patched or upgraded your OMS.
emcli login -username="SYSMAN"
emcli sync
CLI References
Oracle document #E17786.12 contains a catalog of the EM CLI verbs available with the release of OEM 12.1.0.4. Check
with Oracle at http://docs.oracle.com/cd/E24628_01/em.121/e17786.pdf to make sure you have the latest version.
Help is also available online through EM CLI itself. The current listing of verbs known to your OMS software
library is available at the command line.
 
Search WWH ::




Custom Search