ServiceManager … as a daemon

In an earlier post on ServiceManager, I took a look at how you could start/stop the ServiceManager manually.  A lot of what was said in that post still applies to this post; however, in this one I’m going to take a look at how to review the ServiceManager when it is configured as a daemon along with some additional insights.  

During the initial setup of Oracle GoldenGate ServiceManager using the Oracle GoldenGate Configuration Assistant (OGGCA); the ServiceManager is the first service that has to be installed/configured.  As such, I’m assuming that it is configured as a daemon process for the purpose of this post.

How to know if ServiceManager is installed as a daemon?

The simplest way to find out if ServiceManager is configured as a daemon on a host is to look at the /etc/oggInst.loc file.  This file only exists if the ServiceManager is configured as a daemon.  

NewImage

The contents of /etc/oggInst.loc simply points to the inventory location for ServiceManager.  This is basically pointing to the configuration directory under the $OGG_ETC_HOME for the ServiceManager.

oggInst1.png

In this directory, there is a “dat” file called deploymentRegistry.dat.  This is the registry file used by ServiceManager to identify deployments that are associated with itself.

WARNING: Do NOT edit any “dat” files you find within Oracle GoldenGate Microservices!!!

At this point, it is safe to say that the ServiceManager is configured as a daemon on the host.

 

How to know if ServiceManager is running?

After identifying that the ServiceManager is running as a daemon, how do you find the status of the ServiceManager?  This is simple, but you will need either sudo rights for your host account or direct access to the root account on the host.  For testing purposes, I’ve got root access on my vm (lucky me).

The easiest way to check is to use the System Control (systemctl) command to see if the OracleGoldenGate.service is running.  From the command line as root or using sudo, run:

$ systemctl status OracleGoldenGate.service

You should get a return that looks something similar to this image output:

SMDaemonOutput.png

 If you output is different, try starting the service.  If that fails, then you might not be configured as a daemon.

Knowing that the ServiceManager is running, I can control what happens with it from the command line. The commands that can be used are:

$ systemctl start OracleGoldenGate.service
$ systemctl status OracleGoldenGate.service
$ systemctl stop OracleGoldenGate.service
$ systemctl restart OracleGoldenGate.service

 

How do I know what Oracle GoldenGate binaries the ServiceManager is using?

With the ServiceManager running you can identify what Oracle GoldenGate Home the ServiceManager is using by looking at the status.  Running systemctl status OracleGoldenGate.service will tell you what directory ServiceManager is running out of.  

$ systemctl status OracleGoldenGate.service

 Example: 

[root@OGG19C /]# systemctl status OracleGoldenGate.service
● OracleGoldenGate.service – Oracle GoldenGate Service Manager
Loaded: loaded (/etc/systemd/system/OracleGoldenGate.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-10-24 18:58:49 UTC; 3s ago
Main PID: 13864 (ServiceManager)
Tasks: 13
CGroup: /system.slice/OracleGoldenGate.service
└─13864 /opt/app/oracle/product/19.1.0/oggcore_1/bin/ServiceManager

Oct 24 18:58:49 OGG19C systemd[1]: Stopped Oracle GoldenGate Service Manager.
Oct 24 18:58:49 OGG19C systemd[1]: Started Oracle GoldenGate Service Manager.
Oct 24 18:58:49 OGG19C ServiceManager[13864]: 2019-10-24T18:58:49.770+0000 INFO | Configuring user authorization secure store path as ‘/opt/app/…Store/’.
Oct 24 18:58:49 OGG19C ServiceManager[13864]: 2019-10-24T18:58:49.781+0000 INFO | Configuring user authorization as ENABLED.
Oct 24 18:58:49 OGG19C ServiceManager[13864]: Oracle GoldenGate Service Manager for Oracle
Oct 24 18:58:49 OGG19C ServiceManager[13864]: Version 19.1.0.0.2 OGGCORE_19.1.0.0.0_PLATFORMS_190823.0013
Oct 24 18:58:49 OGG19C ServiceManager[13864]: Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
Oct 24 18:58:49 OGG19C ServiceManager[13864]: Linux, x64, 64bit (optimized) on Aug 23 2019 07:53:21
Oct 24 18:58:49 OGG19C ServiceManager[13864]: Operating system character set identified as UTF-8.

 Hope this help you understand how to interact with ServiceManager from the command line and provide some guidance on what to look forward.

Enjoy!!!

 

Please follow and like:

Enquire now

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.