ServiceManager start and stop via command line - Automic Automation
search cancel

ServiceManager start and stop via command line - Automic Automation

book

Article ID: 445762

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

This article provides information for managing the Automic Service Manager on Unix/Linux via the command line. 

Environment

  • Product: Automic Workload Automation
  • Component: Automation Engine, Service Manager
  • Platform: Unix/Linux

Resolution

Interactive Session (Manual Start)

Option 1: Linux Interactive (cli)

To start the Service Manager for an interactive session:

  1. Navigate to the /path/to/ServiceManager/bin folder.
  2. Execute the following command:
    nohup ./ucybsmgr -i > /dev/null 2>&1 &

For more details on setting up Service Manager and the documented startup command, see: Installing the ServiceManager

 

Option 2: Linux Interactive (script)

A sample automicsm script is located in the /path/to/ServiceManager/bin folder. Ensure the following variables are customized by the Linux Administrator:

  • DAEMON_PATH: Full path to the ServiceManager/bin directory.
  • DAEMONOPTS: Path to the .ini file and Phrase (e.g., "-iucybsmgr.ini UC4").
  • LD_LIBRARY_PATH: Ensure this includes paths for required libraries (such as the Oracle client).

  • CAPKIHOME: Ensure this points to your CAPKI installation to secure communication.

  • CASHCOMP: Following guidance offered here: CAPKI - Securing the ServiceManager.

Starting via the interactive automicsm script: 

cd /path/to/ServiceManager/bin
./automicsm start

 

 

Autostart Configuration (Daemon Mode)

Most modern Linux distributions use systemd. This is not an officially supported setup/configuration. The values seen below are based on local testing. The values shown are not specifically required by Automic. Adjust values to match your environment's appropriate values. 

  1. Create a service file at /etc/systemd/system/automicsmd.service with the following content:

    [Unit]
    Description=Automic ServiceManager
    After=network.target
    
    [Service]
    Type=simple
    User=automic
    Group=automic
    Environment="CAPKIHOME=/opt/CA/SharedComponents/CAPKI"
    Environment="LD_LIBRARY_PATH=.:/opt/automic/ServiceManager/bin"
    Environment="CASHCOMP=/opt/CA/SharedComponents"
    WorkingDirectory=/opt/automic/ServiceManager/bin
    ExecStart=/opt/automic/ServiceManager/bin/ucybsmgr -iucybsmgr.ini UC4
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
  2. Reload the daemon and start the service:

    sudo systemctl daemon-reload
    sudo systemctl enable automicsmd
    sudo systemctl start automicsmd

     

Gracefully Stopping Service Manager

  • If running via systemd:
    sudo systemctl stop automicsm
  • If running via automicsm:
    cd /path/to/ServiceManager/bin
    ./automicsm stop
  • If running in an Interactive Session:
    1. Find the Process ID (PID):
      ps -ef | grep ucybsmgr
    2. Terminate the process using SIGTERM:
      kill -15 <PID>
      Note: Avoid using kill -9 unless the process is unresponsive to prevent orphaned lock files.

Additional Information

The above information helps with managing the stop/start of ServiceManager (and the processes they manage). Once ServiceManager has been started, you can manage (stop/start) processes remotely using ServiceManager - Dialog Program