Hitachi

JP1 Version 12 JP1/Automatic Operation Configuration Guide 


2.9 Settings for automatically starting JP1/AO when the OS starts (in Linux)

If the OS of the JP1/AO server is Linux, with the initial settings, the JP1/AO service is not automatically started when the OS starts.

For the JP1/AO service to start automatically when the OS starts, perform one of the following methods.

For Linux 8, use the method in CASE1. Also, replace uCPSB that is included in the path specified in the script file with uCPSB11.

CASE1: Set a new environment to use systemd (such as Red Hat Enterprise Linux 7)

CASE2: Already configured in an environment that uses systemd (such as Red Hat Enterprise Linux 7)

If automatic startup has already been set up in the existing environment using the following method and there is no problem, there is no need to change the setting.

If automatic startup fails using the following method, cancel the following settings and then perform the setting method for CASE1.

CASE3: Environments that use automatic startup scripts (such as Red Hat Enterprise Linux 6)

  • Setting method

    In the startup script of the OS, specify the value that is set in the LANG environment variable and specify a setting that executes the hcmds64srv command.

    Because the services of the common component are set to start automatically at OS startup, you must specify "AutomationWebService" as the server option so that only the JP1/AO service will be started.

    When only the JP1/AO service is started with the server option specified, it is necessary to start the common component and database services beforehand. Therefore, it is necessary to check to see whether the JP1/AO service is started after checking the existence of common component and database process.

    When the OS is stopped, the JP1/AO service and the services of the common component are set to automatically stop, so you do not need to set automatic stop.

    Example:

    #!/bin/sh
    # chkconfig: 2345 99 01
    # description: JP1/Automatic Operation
    PROG_NAME=startao
    
    start() {
        /home/jp1ao/startao2 &
    }
    
    case "$1" in
      start)
        start
        ;;
      *)
        echo "Usage: ${PROG_NAME} start"
        exit 1
    esac
    exit 0
    
    /home/jp1ao/startao2
    #!/bin/sh
    HCMDS_HOME=/opt/HiCommand/Base64
    
    start() {
        export LANG=ja_JP.utf8
        ${HCMDS_HOME}/bin/hcmds64srv -start -server AutomationWebService
        rtn_code=$?
        logger -i -s -t [AUTOMATION] \
       "${HCMDS_HOME}/bin/hcmds64srv -start -server AutomationWebService[${rtn_code}]"
    }
    
    for i in `seq 1 10`
    do
        cjstartsv_counter=`ps -ef | \
        grep ${HCMDS_HOME}/uCPSB/CC/server/bin/cjstartsv | grep -v grep | wc -l`
        hcs_hsso_counter=`ps -ef | \
        grep \
        ${HCMDS_HOME}/uCPSB/CC/server/repository/HBase64StgMgmtSSOService/hcs_hsso | \
        grep -v grep | wc -l`
        httpsd_counter=`ps -ef | \
        grep ${HCMDS_HOME}/uCPSB/httpsd/sbin/httpsd | grep -v grep | wc -l`
        rotatelogs_counter=`ps -ef | \
        grep ${HCMDS_HOME}/uCPSB/httpsd/sbin/rotatelogs | grep -v grep | wc -l`
        pdprcd_counter=`ps -ef | \
        grep ${HCMDS_HOME}/HDB/lib/servers/pdprcd | grep -v grep | wc -l`
        pdmlgd_counter=`ps -ef | \
        grep ${HCMDS_HOME}/HDB/lib/servers/pdmlgd | grep -v grep | wc -l`
        pdrdmd_counter=`ps -ef | \
        grep ${HCMDS_HOME}/HDB/lib/servers/pdrdmd | grep -v grep | wc -l`
        sleep 60
    
        if [ $cjstartsv_counter -ge 1 -a \
             $hcs_hsso_counter -ge 1 -a \
             $httpsd_counter -ge 22 -a \
             $rotatelogs_counter -ge 4 -a \
             $pdprcd_counter -ge 1 -a \
             $pdmlgd_counter -ge 1 -a \
             $pdrdmd_counter -ge 1 ]; then
            start
            exit 0
        fi
    done
    
    logger -i -s -t [AUTOMATION] "Common Component seems to be dead."
    exit 1 
    
  • Release method
    1. If JP1/AO is running, execute the following command to stop JP1/AO.

      /opt/HiCommand/Base64/bin/hcmds64srv -stop

    2. Delete the created startup script.
    3. Execute the following command to delete the script file.

      rm -i /home/jp1ao/startao2