Running the SCM Single User Agent as a service
search cancel

Running the SCM Single User Agent as a service

book

Article ID: 49076

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister CA Harvest Software Change Manager

Issue/Introduction

The SCM Single User Agent is most commonly implemented as an application that runs at the time the user is logged into the agent machine, and then shutsdown when, or before the user logs off. But what if you need the Single User Agent to remain running whether or not the user is logged in?

Environment

Harvest Software Change Manager v12.x and higher

Resolution

This can be done on Unix/Linux and on Windows.

On Unix/Linux the steps include

  1. Login to the agent machine as root or as the cascm user (userid that owns the folder where CA SCM is installed) and navigate to the $CA_SCM_HOME folder

  2. If you want to run the agent using a dfo file instead of command line parameters for user and password, execute the svrenc command to create a new dfo file containing the userid and password the agent process will use

  3. Create a new batch script containing a command similar this:

    exec /bin/su - cascm -c ". /opt/CA/scm/bin/agntd -eh=/opt/CA/scm/agentinfo.dfo"	-or-exec /bin/su - cascm -c ". /opt/CA/scm/bin/agntd -usr=cascm -pwd=harvest"
  4. Test the script from the command line, logged in as the cascm user, to assure it starts the agent process as expected

  5. Have the Unix/Linux system administrator add a record to the /etc/inittab table to call the script at startup

On Windows the steps include

  1. Login to the agent machine as the cascm user and navigte to the %CA_SCM_HOME% folder

  2. If you want to run the agent using a dfo file instead of command line parameters for user and password, execute the svrenc command to create a new dfo file containing the userid and password the agent process will use

  3. Create a new batch script containing a command similar to this:

    agntd -eh=agentinfo.dfo-or-agntd -usr=cascm -pwd=harvest
  4. Test the script from the command line, logged in as the cascm user, to assure it starts the agent process as expected

  5. Have the Windows system administrator create a Windows Scheduled Task to run the script as the cascm user ever time the computer starts up. Make sure to select the option to run the script whether the user is logged in or not.

On the AIX platform the steps include

You will create a script that does the following.

  • perform the "su" command to switch to the user you want to run the single user agent
  • execute the command to start the single user agent with that user.

For example:

su - <userid>
<scm installation folder>/bin/agntd -usr=<userid> -eh=<encrypted password filename> -port=<port number>


Then, add an entry in /etc/inittab in the following format:

    id:runlevels:action:process


id: A unique identifier for the entry (1-4 characters).

runlevels: The run levels at which the process should be active. AIX typically uses runlevel 2 for normal multi-user operation.

action: Specifies how init should handle the process. Common actions include:

  • respawn: Starts the process if it doesn't exist and restarts it if it terminates.
  • wait: Starts the process and waits for it to complete before proceeding.
  • once: Starts the process once, but doesn't restart it if it terminates.
  • boot: Starts the process during the boot phase, before init enters a specific runlevel.
  • bootwait: Similar to boot, but waits for the process to complete.

process: The command or script to be executed.

For example::

hagntd:2:once:<scm installation folder>/bin/agntd -usr=<userid> - -port=<port number>

Additional Information

More information on starting the single user agent can be found here: Configure the Broker and Server Communication on Windows - Single-User Agent