Monday 16 September 2013

ZOC ( ZAP-O-COMM) Introdcuction

ZOC which stands for ZAP-O-COMM is a Secure Sheel / Telnet client and terminal emulator like PuTTY.
It provides secure mode of communication by connecting through to host or mainframes using secure shell, telnet and serial cable,modem.

In the PuTTY , we are manually doing the things. I mean to say for health check up the status of the application(Components and process Type)  in Oracle Application Server every time we are manually enter the command in the command line Interface(PuTTY) which is taking more time.

To consume less time and make all the things automated we are using ZOC. It can also acts like a scheduler too. 

I want to make an comparison betweeb PuTTY and ZOC and how can work on the ZOC.

Note:  Both PuTTY and ZOC are provide the secure communication to the server and database. Both are good. You can choose any but to automate the task we required ZOC.

In my below pictures I have did the helath check up of my componenets in Retail Application. And as you can see ,every time manually I have type the same command .

Note: OPMNCTL STATUS - Used to check out the status of the componetes in server. Here I am checking the status of the Oracle Application Components in Oracle Application Server.
OPMNCTL- Oracle Preocess Manager & Notification Server Control

         . .profile - It it a command which is used to change from one group to another group after complition of checking of the status of one group.

As you see in the below, when I have completed the status report of OC4J ,I have jumped to OID , then MIDTIER and so on.

Acivites on PuTTY

**************************************************************************************
login : give your respective login details
username@xyz-asd006.woow.com's password: proovide ur password.

Last unsuccessful login: Tue Aug 20 05:08:17 CDT 2013 on ssh from 192.168.20.100
Last login: Mon Sep 16 04:33:42 CDT 2013 on /dev/pts/4 from 192.168.20.97
*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 6.1!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************

$ sudo su - abc
Password:
please enter your choice of Oracle Home:
 1 -- 10.1.3.4 OC4J
 2 -- 10.1.2.3 OID
 3 -- 10.1.2.3 midtier
 4 -- 10.1.3.3 webcenter
 5 -- 10.1.3.3 OBIEE
 6 -- 10.1.3.3 OBIEE 2

1
oretail@xyz-asd006|OC4J: opmnctl status

Processes in Instance: oc4j_instance.xyz-asd006.woow.com
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status 
---------------------------------+--------------------+---------+---------
OC4JGroup:reim_base_group        | OC4J:reim_base_oc~ | 6553614 | Alive  
OC4JGroup:sim_base_group         | OC4J:sim_base_oc4j | 248382~ | Alive  
OC4JGroup:rpm_group              | OC4J:rpm_oc4j      | 7143614 | Alive  
OC4JGroup:price_group            | OC4J:price_oc4j    | 241829~ | Alive  
OC4JGroup:rib_group              | OC4J:rib-sim-oc4j~ | 8388678 | Alive  
OC4JGroup:rib_group              | OC4J:rib-tafr-oc4~ | 148769~ | Alive  
OC4JGroup:rib_group              | OC4J:rib-func-art~ | 210371~ | Alive  
OC4JGroup:rib_group              | OC4J:rib-rpm-oc4j~ | 254280~ | Alive  
OC4JGroup:rib_group              | OC4J:rib-rms-oc4j~ | 142870~ | Alive  
OC4JGroup:reim_group             | OC4J:reim_oc4j     | 281151~ | Alive  
OC4JGroup:sim_group              | OC4J:sim_oc4j      | 157942~ | Alive  
OC4JGroup:alloc_group            | OC4J:alloc_oc4j    | 219546~ | Alive  
ASG                              | ASG                |     N/A | Down   
OC4JGroup:default_group          | OC4J:home          | 176294~ | Alive  
HTTP_Server                      | HTTP_Server        | 277217~ | Alive  

oretail@xyz-asd006|OC4J: . .profile
please enter your choice of Oracle Home:
 1 -- 10.1.3.4 OC4J
 2 -- 10.1.2.3 OID
 3 -- 10.1.2.3 midtier
 4 -- 10.1.3.3 webcenter
 5 -- 10.1.3.3 OBIEE
 6 -- 10.1.3.3 OBIEE 2

2
oretail@xyz-asd006|OID: opmnctl status

Processes in Instance: oid_instance.xyz-asd006.woow.com
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status 
-------------------+--------------------+---------+---------
HTTP_Server        | HTTP_Server        | 290324~ | Alive  
LogLoader          | logloaderd         |     N/A | Down   
dcm-daemon         | dcm-daemon         |     N/A | Down   
OC4J               | OC4J_SECURITY      | 124520~ | Alive  
OID                | OID                | 128452~ | Alive  
DSA                | DSA                |     N/A | Down   

oretail@xyz-asd006|OID: . .profile
please enter your choice of Oracle Home:
 1 -- 10.1.3.4 OC4J
 2 -- 10.1.2.3 OID
 3 -- 10.1.2.3 midtier
 4 -- 10.1.3.3 webcenter
 5 -- 10.1.3.3 OBIEE
 6 -- 10.1.3.3 OBIEE 2

3
oretail@xyz-asd006|Mid: opmnctl status

Processes in Instance: frm_intance.xyz-asd006.wow.com
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status 
-------------------+--------------------+---------+---------
HTTP_Server        | HTTP_Server        | 220201~ | Alive  
LogLoader          | logloaderd         |     N/A | Down   
dcm-daemon         | dcm-daemon         |     N/A | Down   
OC4J               | home               | 283771~ | Alive  
OC4J               | OC4J_BI_Forms      | 294912~ | Alive  
OC4J               | OC4J_Portal        | 9764922 | Alive  
WebCache           | WebCache           | 212993~ | Alive  
WebCache           | WebCacheAdmin      | 297534~ | Alive  
DSA                | DSA                |     N/A | Down   

oretail@xyz-asd006|Mid: . .profile
please enter your choice of Oracle Home:
 1 -- 10.1.3.4 OC4J
 2 -- 10.1.2.3 OID
 3 -- 10.1.2.3 midtier
 4 -- 10.1.3.3 webcenter
 5 -- 10.1.3.3 OBIEE
 6 -- 10.1.3.3 OBIEE 2

4
oretail@xyz-asd006|Web: opmnctl status
Unable to connect to opmn.
Opmn may not be up.
oretail@xyz-asd006|Web: . .profile
please enter your choice of Oracle Home:
 1 -- 10.1.3.4 OC4J
 2 -- 10.1.2.3 OID
 3 -- 10.1.2.3 midtier
 4 -- 10.1.3.3 webcenter
 5 -- 10.1.3.3 OBIEE
 6 -- 10.1.3.3 OBIEE 2

5
oretail@xyz-asd006|OBIEE: opmnctl status

Processes in Instance: OBI_Rep.xyz-asd006.woow.com
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status 
---------------------------------+--------------------+---------+---------
OC4JGroup:bipublisher            | OC4J:bipublisher   | 112066~ | Alive  
OC4JGroup:bipublisher_batch_gro~ | OC4J:bipublisher_~ | 7733480 | Alive  
OC4JGroup:obieealerts_group      | OC4J:obieealerts_~ | 106170~ | Alive  
OC4JGroup:rms-service-group      | OC4J:rms-service-~ | 209715~ | Alive  
OC4JGroup:rslgroup               | OC4J:rsl-rms-oc4j  | 103547~ | Alive  
ASG                              | ASG                |     N/A | Down   
OC4JGroup:default_group          | OC4J:home          | 214960~ | Alive  
HTTP_Server                      | HTTP_Server        | 167117~ | Alive  

oretail@xyz-asd006|OBIEE: 

 ***********************************************************************************

Now the same activity how to do in the ZOC

First of all you need to download the ZOC.
For download the ZOC software you can refer the following site or you can google to download the comptabitlity version to your system.

http://zoc.softpedia.com/

After installing the zoc in your system, the very first thing you need to do is to erite the script.

Step1. Write the script which will run in ZOC. The script extension be .zrx
****************************************************************
zoc_o_comm.zrx


/* CALL ZocTimeout 60 */
CALL ZocWaitForSeq 1
Call ZOCSetDevice "SSH"
Call ZOCConnect "username:password@10.234.230.345"     /* username- In which You login with putty, password- the password for the same
                                                          and 10.234.230.345 in which ip adds you are login */


/*EBS and Retail Application */
CALL ZocWait "$ "
CALL ZocSend "sudo su - abc ^M"
CALL ZocWait "Password:"
CALL ZocSend "give ur password here ^M"                /* ^M - means enter (after giving pwd, I hit enter key that's y I make it ^M) and same rule applied for all.
CALL ZocWait "please enter your choice of Oracle Home:"

CALL ZocSend "1 ^M"
CALL ZocWait "oretail@xyz-asd006|OC4J: "

CALL ZocSend "opmnctl status ^M"
CALL ZocWait "oretail@xyz-asd006|OC4J: "

CALL ZocSend ". .profile ^M"
CALL ZocWait "please enter your choice of Oracle Home:"

CALL ZocSend "2 ^M"
CALL ZocWait "oretail@xyz-asd006|OID: "

CALL ZocSend "opmnctl status ^M"
CALL ZocWait "oretail@xyz-asd006|OID: "


CALL ZocSend ". .profile ^M"
CALL ZocWait "please enter your choice of Oracle Home:"

CALL ZocSend "3 ^M"
CALL ZocWait "oretail@xyz-asd006|Mid: "

CALL ZocSend "opmnctl status ^M"
CALL ZocWait "oretail@xyz-asd006|Mid: "


CALL ZocSend ". .profile ^M"
CALL ZocWait "please enter your choice of Oracle Home:"

CALL ZocSend "4 ^M"
CALL ZocWait "oretail@xyz-asd006|Web: "

CALL ZocSend "opmnctl status ^M"
CALL ZocWait "oretail@xyz-asd006|Web: "


CALL ZocSend ". .profile ^M"
CALL ZocWait "please enter your choice of Oracle Home:"

CALL ZocSend "5 ^M"
CALL ZocWait "oretail@xyz-asd006|OBIEE: "

CALL ZocSend "opmnctl status ^M"
CALL ZocWait "oretail@xyz-asd006|OBIEE: "


CALL ZocSend "exit^M"
Call ZocDisconnect                             /* it will disconnect the zoc after complete whole process */
CALL ZocTerminate
EXIT


and when you complete it and save the file as .zrx extension you will see a in the file saved place.

Step2. Run the file.

           Just click on the saved file it will automatically run the script for you.

Step3: Now you can see a log files are generated in the logfile folder on the document directory as shown in the below .





Step4.  Click on the ZOC1309_10.200.13.19801 log you wil see the all the status information egarding all the components as shown in the putty(above description).

Step5. On the next day when you again start the health check up ,please delete the previous days logfiles from the log file folder and start .


Thanks and Have Fun.



1 comment:

  1. its really so nice of you to make this documented :) More to learn with ZOC !!

    ReplyDelete