R12: Opmnctl long option

Hi Everyone!!

Here is good option of opmnctl utility you can use to find various good information like memory usage, start time, ports being used.

By default, adopmnctl.sh status gives short status message

[applmgrr12@champ scripts]$ ./adopmnctl.sh status

You are running adopmnctl.sh version 120.4

Checking status of OPMN managed processes...

Processes in Instance: r12test_champ.champ.dunno.com
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
OC4J | oafm | 5693 | Alive
OC4J | forms | 5692 | Alive
OC4J | oacore | 5691 | Alive
HTTP_Server | HTTP_Server | 5694 | Alive
ASG | ASG | N/A | Down


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /app/inst/apps/r12test_champ/logs/appl/admin/log/adopmnctl.txt for more information ...

[applmgrr12@champ scripts]$

To get more information from status control code, change the following line in
adopmnctl.sh script from "opmnctl $control_code " to "opmnctl $control_code -l "
(autoconfig will override this file. If you want to make this permanent you need to look for autoconfig template file.

if [ $control_code = "status" ]; then
printf "Checking status of OPMN managed processes...\n"
if [ -f "$LOGAP" ]; then
printf "\n`date +%D-%T` :: $program: Checking the status of Oracle Process Manager (OPMN)\n\n" >> $LOGAP
/app/inst/apps/r12test_champ/ora/10.1.3/opmn/bin/opmnctl $control_code -l 2>&1 | tee -a $LOGAP
fi
exit_code=$?;

elif

After changing you will see the below long status message

[applmgrr12@myhost scripts]$ ./adopmnctl.sh status

You are running adopmnctl.sh version 120.4

Checking status of OPMN managed processes...

Processes in Instance: r12test_myhost.myhost.mydomain.com
-------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component | process-type | pid | status | uid | memused | uptime | ports
-------------------+--------------------+---------+----------+------------+----------+-----------+------
OC4J | oafm | 5693 | Alive | 1972203545 | 148544 | 0:38:59 | jms:24525,ajp:25025,rmi:25525
OC4J | forms | 5692 | Alive | 1972203544 | 96212 | 0:38:59 | jms:23525,ajp:22025,rmi:20525
OC4J | oacore | 5691 | Alive | 1972203543 | 120000 | 0:38:59 | jms:23025,ajp:21525,rmi:20025
HTTP_Server | HTTP_Server | 5694 | Alive | 1972203554 | 8386112 | 0:38:59 | http1:7777,http2:7200
ASG | ASG | N/A | Down | N/A | N/A | N/A | N/A


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /app/inst/apps/r12test_myhost/logs/appl/admin/log/adopmnctl.txt for more information ...

[applmgrr12@myhost scripts]$


You will come to know if oc4j got crashed and got restarted automatically by opmn from uptime column(it will have less uptime comparatively with other processes)

I have killed the forms oc4j. (kill -9 5692). Now status shows

[applmgrr12@myhost scripts]$ ./adopmnctl.sh status

You are running adopmnctl.sh version 120.4

Checking status of OPMN managed processes...

Processes in Instance: r12test_myhost.myhost.mydomain.com
-------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component | process-type | pid | status | uid | memused | uptime | ports
-------------------+--------------------+---------+----------+------------+----------+-----------+------
OC4J | oafm | 5693 | Alive | 1972203545 | 148544 | 0:38:59 | jms:24525,ajp:25025,rmi:25525
OC4J | forms | 5692 | Alive | 1972203544 | 96212 | 0:00:25 | jms:23525,ajp:22025,rmi:20525
OC4J | oacore | 5691 | Alive | 1972203543 | 120000 | 0:38:59 | jms:23025,ajp:21525,rmi:20025
HTTP_Server | HTTP_Server | 5694 | Alive | 1972203554 | 8386112 | 0:38:59 | http1:7777,http2:7200
ASG | ASG | N/A | Down | N/A | N/A | N/A | N/A


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /app/inst/apps/r12test_myhost/logs/appl/admin/log/adopmnctl.txt for more information ...

[applmgrr12@myhost scripts]$

see you all in next article.

7 comments:

M.Srikanth said...

Hi Suresh,
This is M.Srikanth (Jr.AppsDBA) from Hyderabad.
Recently i started my Career in Oracle AppsDBA, with the support of the Blogs like you people.
You are doing a great & fantastic job by posting all the things in the Net.
I really mad with u r Blog's, daily i am waiting with anxiety to see u r next posting's.
There are so many people working on Appsdba with excellent knowledge, but no one interested to share their knowledge like you.
Really a great job by you. I appreciate you.
Keep going and rock the AppsDBA with ur experiance.

One of ur Fan

M.Srikanth

Suresh Lakshmanan said...

Thank you Srikanth. Good Luck with your career.

With best wishes,
Suresh

SUJIT said...

Thats good info.
Any idea what unit does memused shows for opmnctl -l command?
Means it shows memory used in bytes or kb or mb?

Suresh Lakshmanan said...

Hi Sujit,

It is in bytes.

Thanks
Suresh

ravi said...

Hi, Suresh

I have been following your blog for some. I see your posts are so precise.

I have a small question regarding bringing down opmn services....

Can I bounce the OHS server component alone using adapcctl.sh & adapcctl.sh without bouncing the other Opmn managed services like oacore opmn, forms opmn and oaf opmn ?

I used to bounce all components in 11.5.10 individually like Apache and all....does that same pattern work in R12 or I need to bounce all opmn managed components ?

Please reply my post...

Unknown said...

Hi, Suresh

I have been following your blog for some time. I see your posts are so precise.

I have a small question regarding bringing down opmn services....

Can I bounce the OHS server component alone using adapcctl.sh & adapcctl.sh without bouncing the other Opmn managed services like oacore opmn, forms opmn and oaf opmn ?

I used to bounce all components in 11.5.10 individually like Apache and all....does that same pattern work in R12 or I need to bounce all opmn managed components ?


Suresh Lakshmanan said...

Ravi,

you can bounce individually. there should be no problem.

Suresh