How to Start and Stop the APM Enterprise Manager (MOM, EM, Collector) and Postgres from any directory
search cancel

How to Start and Stop the APM Enterprise Manager (MOM, EM, Collector) and Postgres from any directory

book

Article ID: 48871

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction

Description:

How to run EMCtl.sh from a directory other than $WILYHOME/bin.
How to start and stop Postgres from any directory.

Solution:

EMCtrl.sh looks at the WILYHOME environment variable and uses this location if it is defined. If not, it assumes that the ../ directory is the WILYHOME location.

To run EMCtl.sh from a directory other than $WILYHOME/bin you need to set (and export) the WILYHOME variable.

Here is an example start script that can be executed from anywhere.

startEM.sh:

#!/bin/ksh
export WILYHOME=/apps/introscope
. /apps/introscope/bin/EMCtrl.sh start &

stopEM.sh:

#!/bin/ksh
export WILYHOME=/apps/introscope
. /apps/introscope/bin/EMCtrl.sh stop &

If Postgres is installed in /apps/postgres

The command to start Postgres is:
/apps/postgres/bin/pg_ctl -D /apps/postgres/data -l /apps/postgres/data/pg_log/postmaster.log start &

The command to stop Postgres is:
/apps/postgres/bin/pg_ctl -D /apps/postgres/data stop &

Environment

Release:
Component: APMISP