Silent Deploy of EM12c Agent on HPUX

Any of us in the DBA world know that HPUX doesn’t get a “lot of love” from Oracle. It’s one of those Operating Systems that due to the time and resource restraints on Oracle to provide the level of support for their core OS platforms and products, demands that it is “supported” but will not receive the first line of development that Linux or Solaris will.

With that said, I have a clients who do prefer HPUX with Oracle products with Windows a close second. They have numerous Windows VM environments for test and non-VM for production which serves them well.   All of these HPUX environments have full Enterprise Edition installations on them, so all of these companies are serious about having supported, full featured environments, plain and simple.

With one new build of an EM12c, which happens to be running on Windows, came the requirement to deploy to HPUX targets. These servers  had no other EM agent deployed to them, so they were “clean deployments” but due to being deployed from Windows, this does require not only the Software library configured on the EM, download of the proper agent files to the EM12c and the full installation of Cygwin to support the agent communication from Windows to Unix/Linux/HPUX.

If everything is just not “so” with the HPUX environment, there can be some issues requiring you to perform a silent deploy on the target server.  This is a quite simple process, which I will now go over.  Keep in mind for this demonstration that I will be switching from Windows Command Prompt to Cygwin and then to HPUX, so the commands and slashes can get a bit whacky… 🙂

From the EM Server, log into the Enterprise Manager client and synchronize the software library :

cd $OMS_HOME\bin
$OMS_HOME\oms\BIN>emcli login -username=sysman
Enter password :


You will be asked for the EM12c sysman password, enter this to be logged into the EMCLI utility.

emcli sync
Synchronized successfully

Verify that the platform you require for the deploy is listed:

E:\oracle\product\12.1.0\em12c\oms\BIN>emcli get_supported_platforms
 Getting list of platforms ...
 Check the logs at E:\oracle\product\12.1.0\em12c\oms\BIN/agent.log
 About to access self-update code path to retrieve the platforms list..
 Getting Platforms list  ...
 Version =
 Platform = HP-UX Itanium
 Version =
 Platform = Microsoft Windows x64 (64-bit)
Platforms list displayed successfully.


As we perform first, the software extract from the library and then the deploy, not the syntax from the above list.  It will come in handy…

I’ve created a special folder off the E:\ drive to extract the software in preparation to FTP/SCP to the HPUX target, (E:\hpux_i)

To extract the software, simply type in the following command at the command prompt:

emcli get_agentimage -destination=E:\hpux_i -platform="HP-UX Itanium" -version=

Now FTP or SCP the file over to your HPUX Itanium target.

Once over there,  log into your target HPUX server, unzip the file to the directory you wish to deploy from.

Decide where you wish to deploy the agent to.  I prefer to deploy to $ORACLE_BASE/product/agent12c, as I like to have all my installation off of the same base.  Keep in mind that under the agent12c directory, there will be a core/ subdirectory built.

Once you unzip the files, the $ORACLE_BASE/product/agent12c will contain a number of files.  You have the choice to execute the parameters from the command line or use the response file, I prefer this, as it deters from human error.

There are only a few entries that need to be updated in the response file agent.rsp:

OMS_HOST=<OMS Server Name>
 EM_UPLOAD_PORT=<Upload port>
 AGENT_REGISTRATION_PASSWORD=g<password if you want one>
 AGENT_PORT=3872  <--or open port that you plan on using....
 ORACLE_HOSTNAME=<target server name>

Save the file and exit.

Now you are ready to run the command to deploy the agent silently, utilizing the from the same directory:

./ AGENT_BASE_DIR=<full path to your deployment directory> 
-ignorePreReqs RESPONSE_FILE=<full path to file>

I have a tendency to ignore the prerequisites as many of my clients do not give privileges to Oracle to run and this WILL fail the deployment without it.  I simply have them run the after the successful deployment.

The following is a [non-client identifying] output from the silent deploy.  I thought it was interesting to view HOW much is performed as part of this deployment and know that this close to what is run through the auto deploy from the EM12c:

-e Validating the OMS_HOST & EM_UPLOAD_PORT
 Executing command : $AGENT_HOME/core/ -classpath 
$AGENT_HOME/core/ $AGENT_HOME/agent12c 
$AGENT_HOME/agent12c -prereq
Validating oms host & port with url: http://$HOST:4899/empbs/genwallet
 Validating oms host & port with url: https://$HOST:4899/empbs/genwallet
 Return status:3
 Unzipping the to $AGENT_HOME/agent12c .... -e
 Checking the ownership of agent base directory:$AGENT_HOME/agent12c
 Checking for proper ownership on the agent base directory.
 Checks whether the agent base directory is owned by the agent user oracle  
 and that its parent directory is owned by either the agent user or root.
 Login name is : oracle & file owner is : oracle
 Agent Base directory verification completed Successfully.
 Ownership check completed.
 Executing command : $AGENT_HOME/core/  
-d64 -classpath $AGENT_HOME/core/
$AGENT_HOME/core/ $AGENT_HOME/agent12c $AGENT_HOME/agent12c 
-ignorePrereqs RESPONSE_FILE=$AGENT_HOME/agent.rsp
Cloning the agent home...
 Executing command: $AGENT_HOME/core/ 
-ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait 
ORACLE_HOME=$AGENT_HOME/core/ -responseFile 
ORACLE_HOME_NAME=agent12g1 -force
 Clone Action Logs Location:/$ORACLE_BASE/oraInventory/logs/cloneActions<timestamp>.log
 Cloning of agent home completed successfully
Attaching sbin home...
 Executing command: $AGENT_HOME/core/ 
 -ignoreSysPrereqs -attachHome -waitForCompletion -nowait 
 Attach Home Logs Location:$AGENT_HOME/core/
 Attach home for sbin home completed successfully.
Updating home dependencies...
 Executing command:$AGENT_HOME/core/ 
-ignoreSysPrereqs -updateHomeDeps -waitForCompletion
-invPtrLoc $AGENT_HOME/core/ -force
 Update Home Dependencies 
 Update home dependency completed successfully.
Performing the agent configuration...
 Executing command: $AGENT_HOME/core/ 
ACTION=configure MODE=perform COMPONENT_XML={} 
 Configuration Log Location:$AGENT_HOME/core/
 Agent Configuration completed successfully
The following configuration scripts need to be executed as the "root" user.
 #Root script to run
 To execute the configuration scripts:
 1. Open a terminal window
 2. Log in as "root"
 3. Run the scripts
 Agent Deployment Successful.
 Agent deployment log location:
 Agent deployment completed successfully.


Once you have successfully deployed the agent, have the run as root or as user with sudo privileges, then, check the status and upload the agent:

./emctl status agent
 Last successful upload                       : 2012-07-12 18:12:39
 Last attempted upload                        : 2012-07-12 18:12:39
 Total Megabytes of XML files uploaded so far : 1.49
 Number of XML files pending upload           : 0
 Size of XML files pending upload(MB)         : 0
 Available disk space on upload filesystem    : 86.20%
 Collection Status                            : Collections enabled
 Last attempted heartbeat to OMS              : 2012-07-12 18:16:15
 Last successful heartbeat to OMS             : 2012-07-12 18:16:15
 Agent is Running and Ready
./emctl upload agent
 Oracle Enterprise Manager 12c Cloud Control
 Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
 EMD upload completed successfully

You will now see the host in the list of EM12c hosts in the console:

Now click on “Targets” and “Databases”.

Click on “Add”, go through the standard steps to add the host’s targets to be monitored by the EM12c to the environment, setting the password for the EM12c, (if the database was not prepped, you may have to unlock and reset the DBSNMP dbuser on the target database before you are able to complete the configuration…)

Once finished, you may need to upload the target or just be patient and wait for the green arrow to appear for all targets added:

In your summary page, you should have verify that all targets are up and in a green status:


The process of adding the HPUX targets through a silent deploy is complete!







Author: dbakevlar

Comments Closed

  • mazen

    i follow your steps as it is (while i have same Enviroment) but i’m getting the below Error from Log file:
    INFO: the command:/u01/app/oracle/Agent12c_software/bin/emctl start agent
    INFO: Enterprise Manager 12c Cloud Control
    INFO: (c) 1996, 2011 Oracle Corporation. All rights reserved.
    INFO: agent ……………………………………………………………………………………………………………Consult the log files in: /u0
    SEVERE: start agent command has failed with status1

    could you please advise…
    Thank you

  • If you go to the following directory: /u01/app/oracle/Agent12c_software/sysman/log
    and do an “ls -ltr”, you will see the logs that were the output and where your error has occurred.
    Start by viewing the log with the most recent timestamp, (most likely the emctl.log…) inspecting for more specific information about what caused the agent not to start.
    My first guess is that you need to view and verify that there is not already an agent running in the core directory:
    ps -ef | grep

    You may be surprised to find out you are attempting to start a second agent from the source directory instead of the core one that is
    $AGENT_HOME/core/ <--this one is running and is the one that should be started... $AGENT_HOME/agent_inst/bin/emctl Hope this helps, Kellyn

  • mazen

    Dear Kellyn,
    actually i tried to see if there is any other agent working but there isn’t any, you can check below the last 20 lines from emctl.log file:

    1565 :: Wed Sep 5 17:29:44 status agent returned 1
    1565 :: Wed Sep 5 17:29:44 returned 1
    1565 :: Wed Sep 5 17:29:44 Agent is not running
    1565 :: Wed Sep 5 17:29:44 Wrote UpdateInventory=true in /u01/app/oracle/Agent12c_software/sysman/emd/agntstmp.txt
    1565 :: Wed Sep 5 17:29:44 update_inventory plugin succeeded
    1579 :: Wed Sep 5 17:29:46 Processing start agent
    1579 :: Wed Sep 5 17:29:46 EMHOME is /u01/app/oracle/Agent12c_software
    1579 :: Wed Sep 5 17:29:46 service name is
    1579 :: Wed Sep 5 17:29:46 ParentProcess id=1573
    1579 :: Wed Sep 5 17:29:46 2012::EM_SECURE_HOSTNME:
    1579 :: Wed Sep 5 17:29:46 2012::EM_SECURE_PORT: 3872
    1579 :: Wed Sep 5 17:29:46 2012::EM_LISTEN_ON_ALL_NICS: true
    1579 :: Wed Sep 5 17:29:47 agent returned with retCode=1
    1590 :: Wed Sep 5 17:29:47 Launching the watchdog process.
    1579 :: Wed Sep 5 17:29:47 Launched the watchdog process pid=1590
    1579 :: Wed Sep 5 17:29:47 StartCEMD start retryCount=120
    1579 :: Wed Sep 5 17:29:49 dog processs id: 1590 exited with an exit code of 2
    1579 :: Wed Sep 5 17:31:49 Exited loop retryCount=0 with retCode=1
    1579 :: Wed Sep 5 17:31:49 StartCEMD Querying for the real status of the agent
    1579 :: Wed Sep 5 17:31:50 Check agent status retCode=1
    1579 :: Wed Sep 5 17:31:50 2012::TZ: EmctlLogAvailabilityMarker Operation=start Diag=

    i appreciate your help so much, i tried to rerun the process many times and always get same log

    Thank You