1.2.1 Starting services on monitoring managers and monitoring agents
- Organization of this subsection
(1) Manually starting services on monitoring managers and monitoring agents
Use the jpcspm start command to manually start services on the monitoring manager or the monitoring agent.
You can use the jpcspm start command to start services only on the host to which you have logged on. You cannot start the Performance Management program services on a remote host. When the health check function is enabled, the health check agent starts when PFM - Manager starts.
-
Log on to the host where you want to start services.
Log on to the monitoring manager to start the PFM - Manager services. Log on to the monitoring agent to start the services of PFM-Base and either PFM - Agent or PFM - RM.
-
Execute the jpcspm start command.
Specify the service key indicating the service that you want to start, and execute the jpcspm start command. Service keys that the jpcspm start command can specify are as follows:
-
Manager or mgr: PFM - Manager services on the host
-
AH or act: Action Handler services on the host
For details on the service keys used to start specific PFM - Agent or PFM - RM services on the host, see the appendix describing service naming rules in the manual JP1/Performance Management Planning and Configuration Guide.
For example, to start all of the PFM - Manager, PFM - Base, PFM - Agent, and PFM - RM services on the local host, specify as follows:
jpcspm start -key jp1pc
Specify the instance name to start, separately instance by instance, a PFM - Agent or PFM - RM that runs in the instance environment.
For example, to start the service that has the instance name oracleA in the PFM - Agent for Oracle, specify as follows:
jpcspm start -key Oracle -inst oracleA
-
(2) Enabling or disabling the automatic service start feature for monitoring managers and monitoring agents (Windows)
With the default installation settings, most services start automatically when the system starts. Note that, however, some services of PFM - Agent for Service Response cannot be set to start automatically. For details, see the chapter that describes starting and stopping services in the manual JP1/Performance Management - Agent Option for Service Response.
If automatic startup processing is affected by high load and times out when the system starts, the Performance Management services might fail to start. In this case, block automatic startup and execute the jpcspm start command to start the services.
To disable and enable the automatic start feature:
-
Log on to the monitoring manager or monitoring agent.
-
Choose Services in Windows.
-
In the Services dialog box, choose the Performance Management program service and click Properties from the pull-down menu.
-
In the service properties dialog box, specify Startup type.
To block automatic startup: Manual
To reset automatic startup: Automatic
-
Click the OK button.
-
The service properties dialog box closes.
-
For details about Performance Management program services, see the explanation of the correspondence between the Performance Management service name and the Windows service name in the Appendix in the JP1/Performance Management Planning and Configuration Guide.
- Important
-
Performance Management services are usually controlled from a system account. Changing the settings might cause service operation errors.
Do not modify the account settings of a service unless recommended to do so by this manual.
All the PFM - Base, PFM - Manager, and PFM - Web Console services are operated by using a system account.
For details on PFM - Agent or PFM - RM, see the respective PFM - Agent or PFM - RM manual.
(3) Enabling or disabling the automatic service start feature for monitoring managers and monitoring agents (UNIX)
With the default installation settings, services are not set to start automatically when the system starts.
To set services other than PFM - Web Console to start automatically at system startup, store in the installation folder for Performance Management the script file for starting services automatically (jpc_start). To disable the automatic service start feature, delete the jpc_start file.
Supplemental information:
-
By using this script file, you can start services on the physical host only. You cannot start services on the logical host.
-
In the default settings of the script file for starting services automatically (jpc_start), all the PFM services on the physical host are set to start. Therefore, if an instance is not created in a physical environment that has an agent that creates an instance, the KAVE06017-W message is output. If you want only specific services to start automatically, edit the following line in the script file:
- Before:
-
nohup /opt/jp1pc/tools/jpcstart all -nochk 2> /dev/null 1> /dev/null &
- After:
-
nohup /opt/jp1pc/tools/jpcstart act -nochk 2> /dev/null 1> /dev/null
nohup /opt/jp1pc/tools/jpcstart <service-key> -nochk 2> /dev/null 1> /dev/null &
Note: Include the first line only if you need to start the Action Handler service. Do not place an ampersand (&) at the end of the first line. In <service-key> in line 2, specify the service key of the service that you want to start automatically.
-
For the PFM - Manager service to start automatically, make the following change in the script file for starting services automatically (jpc_start).
- Before:
-
nohup /opt/jp1pc/tools/jpcstart all -nochk 2> /dev/null 1> /dev/null &
- After:
-
nohup /opt/jp1pc/tools/jpcstart mgr -nochk 2> /dev/null 1> /dev/null
nohup /opt/jp1pc/tools/jpcstart act -nochk 2> /dev/null 1> /dev/null
nohup /opt/jp1pc/tools/jpcstart <service-key> -nochk 2> /dev/null 1> /dev/null &
Note: Do not place an ampersand (&) at the end of the first and second lines. In <service-key> in line 3, specify the service key of the service that you want to start automatically.
-
To change the temporary file output destination directory, make the following change in the script file for starting services automatically (jpc_start).
- Before:
-
export PATH SHLIB_PATH LD_LIBRARY_PATH LIBPATH HCCLIBCNF
- After:
-
JPC_TMPDIR=temporary-file-output-destination-directory
export PATH SHLIB_PATH LD_LIBRARY_PATH LIBPATH HCCLIBCNF JPC_TMPDIR
Note: For temporary-file-output-destination-directory, specify the path to a directory on the disk that has sufficient free space.
-
At startup, Performance Management is subject to the LANG environment variable set in the environment where it operates. In an environment where the LC_ALL environment variable is set to a different value from the LANG environment variable, either unset the LC_ALL environment variable or change its value to match the LANG environment variable. Use the following example as a reference for editing the script file for starting services automatically (jpc_start) to set the LANG environment variable for Performance Management:
- Example settings:
-
## Set Environment-variables
PATH=/sbin:/bin:/usr/bin:/opt/jp1pc/bin
SHLIB_PATH=/opt/hitachi/common/lib
LD_LIBRARY_PATH=/opt/hitachi/common/lib
LIBPATH=/opt/hitachi/common/lib
HCCLIBCNF=/opt/jp1/hcclibcnf
LANG=LANG-environment-variable-to-set#1
export PATH SHLIB_PATH LD_LIBRARY_PATH LIBPATH HCCLIBCNF LANG#1
unset LC_ALL#2
#1: Line that is to be added to the script file for starting services automatically. For details on the LANG environment variable values you can use with Performance Management, see the chapters on installation and setup in the JP1/Performance Management Planning and Configuration Guide and the manuals for PFM - Agent or PFM - RM.
#2: An example of coding that unsets the LC_ALL environment variable.
- Important
-
When the automatic service start and stop features are enabled in a CentOS 7, Linux 7, Oracle Linux 7, or SUSE Linux 12 environment and the jpcspm start command is used to start services, the services will not stop automatically when the OS shuts down. If you want the services to stop automatically, use the systemctl command to restart all Performance Management services. Alternatively, use the jpcspm stop command to manually stop the services that were started by the jpcspm start command.
The following example uses the systemctl command to restart the services:
> systemctl stop jp1_pc
> systemctl start jp1_pc
To set automatic start of services:
-
Log on to the host that you want to set for the automatic start of services.
-
Execute the following command to move to the /opt/jp1pc directory:
cd /opt/jp1pc
-
Set the script file for starting services automatically for the Performance Management system.
-
Name of the .model file of the service automatic start script: jpc_start.model
-
Name of the script file for starting services automatically: jpc_start
Copy the .model file of the service automatic start script to the script file for starting services automatically to add execution permission. Execute the command as follows:
cp -p jpc_start.model jpc_start chmod 555 jpc_start
-
-
Register the automatic start script file for AIX (in AIX only).
To execute the automatic service start script file for the Performance Management system specified in step 3, Performance Management provides the automatic start script file for AIX. Register this automatic start script file to the AIX settings file.
1. Use the mkitab command to register the /etc/rc.jp1_pc file to the /etc/inittab settings file.
mkitab "jp1pc:2:wait:/etc/rc.jp1_pc >/dev/console 2>&1"
2. Use the lsitab command to confirm that the /etc/rc.jp1_pc file is registered to the /etc/inittab settings file.
lsitab jp1pc jp1pc:2:wait:/etc/rc.jp1_pc >/dev/console 2>&1
Registering the file by the mkitab command places the file to the bottommost line of the /etc/inittab settings file. If a program linked by execution of an action is already registered in the /etc/inittab settings file, edit the /etc/inittab settings file so that the reference to the automatic start script file appears below it in the file.
Also, the line registered in the /etc/inittab settings file is not deleted upon uninstallation.
To cancel the registration at uninstallation:
1. Use the rmitab command to cancel the registration of the /etc/rc.jp1_pc file from the /etc/inittab settings file.
rmitab jp1pc
2. Use the lsitab command to confirm that the /etc/rc.jp1_pc file is not registered to the /etc/inittab settings file.
lsitab jp1pc
-
Register the Performance Management services into the OS (in CentOS 7, Linux 7, Oracle Linux 7, and SUSE Linux 12 only).
The registration procedure is as follows:
1. Edit the service automatic start script (/etc/init.d/jp1_pc).
Before editing:
#!/bin/sh ## Copyright (C) 2004, 2016, Hitachi, Ltd. ## Copyright (C) 2016, Hitachi Solutions, Ltd. ## Licensed Material of Hitachi, Ltd. :
After editing:
#!/bin/sh ## Copyright (C) 2004, 2016, Hitachi, Ltd. ## Copyright (C) 2016, Hitachi Solutions, Ltd. ## Licensed Material of Hitachi, Ltd. ### BEGIN INIT INFO # Provides: jp1_pc # Required-Start: $local_fs $remote_fs $syslog $network # Required-Stop: $local_fs $remote_fs $syslog $network # Default-Start: 3 5 # Default-Stop: 0 6 # Description: Start PFM services. ### END INIT INFO :
2. Execute the following command:
chkconfig jp1_pc on
To disable automatic start of services, perform the procedure below.
- Important
-
In CentOS 7, Linux 7, Oracle Linux 7, or SUSE Linux 12, also disable the automatic service stop feature when you disable the automatic service start feature. For details, see 1.3.1(3) Enabling or disabling the automatic service stop feature for monitoring managers and monitoring agents (UNIX).
-
Delete the jpc_start file that was stored when the automatic service start feature was set.
-
Execute the following command to delete the Performance Management services that are registered in the OS (in CentOS 7, Linux 7, Oracle Linux 7, and SUSE Linux 12 only):
chkconfig jp1_pc off