Cluster Server 7.3.1 Bundled Agents Reference Guide - Linux
- Introducing Bundled agents
- Storage agents
- DiskGroup agent
- DiskGroupSnap agent
- Notes for DiskGroupSnap agent
- Sample configurations for DiskGroupSnap agent
- Volume agent
- VolumeSet agent
- Sample configurations for VolumeSet agent
- LVMLogicalVolume agent
- LVMVolumeGroup agent
- Sample configurations for LVMVolumeGroup agent
- Mount agent
- Sample configurations for Mount agent
- VMwareDisks agent
- SFCache agent
- AWS EBSVol agent
- AzureDisk agent
- Network agents
- About the network agents
- IP agent
- NIC agent
- Notes for the NIC agent
- Sample configurations for NIC agent
- IPMultiNIC agent
- MultiNICA agent
- IP Conservation Mode (ICM) for MultiNICA agent
- Performance Mode (PM) for MultiNICA agent
- Sample configurations for MultiNICA agent
- DNS agent
- Agent notes for DNS agent
- About using the VCS DNS agent on UNIX with a secure Windows DNS server
- Sample configurations for DNS agent
- AWSIP agent
- AWSRoute53 agent
- AzureIP agent
- AzureDNSZone agent
- File share agents
- NFS agent
- NFSRestart agent
- Share agent
- About the Samba agents
- SambaServer agent
- SambaShare agent
- NetBios agent
- Service and application agents
- Apache HTTP server agent
- Application agent
- Notes for Application agent
- Sample configurations for Application agent
- CoordPoint agent
- KVMGuest agent
- Notes for KVMGuest agent
- Sample configurations for KVMGuest environment
- Sample configurations for RHEV environment
- Process agent
- Usage notes for Process agent
- Sample configurations for Process agent
- ProcessOnOnly agent
- AzureAuth agent
- Infrastructure and support agents
- Testing agents
- Replication agents
- RVG agent
- RVGPrimary agent
- RVGSnapshot
- RVGShared agent
- RVGLogowner agent
- RVGSharedPri agent
- VFRJob agent
- Dependencies for VFRJob agent
- Notes for the VFRJob agent
Requirement for systemd support
In case of the RHEL 7, SLES 12, and later distributions, you can start applications in system.slice instead of user.slice. To do so, you must create a unit service file for your application under /etc/systemd/system/
. The unit service file name must adhere to the system naming standard and must be unique.
Note:
You must reload the systemd daemon after you change the unit configuration as follows:
systemctl --system daemon-reload
A sample unit service file configuration for the Application agent follows:
Unit service file name:
/etc/systemd/system/vcs-app1.service
Unit service file contents option 1:
[Unit] Description=Veritas Application service file Before=vcs.service [Service] Type=forking Restart=no KillMode=none ExecStart=appStartCommand >/dev/null 2>&1 </dev/null User=john
where, appStartCommand is the command to start the application.
Unit service file contents option 2:
[Unit] Description=Veritas Application service file Before=vcs.service [Service] Type=forking Restart=no KillMode=none ExecStart=/Application/AppStartCustomScript.pl >/dev/null 2>&1 /null User=john
where, AppStartCustomScript.pl
is the script file that contains the command to start the application and its environment variables that are to be exported.
Sample contents of the AppStartCustomScript.pl
file:
#!/usr/bin/perl use warnings; use strict; system('appStartCommand&');
where, appStartCommand is the command to start the application.
The following table describes how the entries in the unit service file are interpreted.
Entry | Description |
---|---|
Before=vcs.service | This unit service is stopped before the |
Restart=no | This unit service is not started again after it fails. |
KillMode=none | The kill signal is not delivered to the unit service file to stop the process. Instead, the VCS application agent handles this task using StopProgram or CleanProgram. |
ExecStart=appStartCommand >/dev/null 2>&1 </dev/null or ExecStart=appStartScript >/dev/null 2>&1 </dev/null | Either a direct command that is used to start the application or the path of the script file that contains the command. |
User=john | The OS user who has privileges to start or stop the application. Note: The value of the User attribute of the application resource must be set to root. |
EnvironmentFile=/tmp/envfile | The environment variables file for the application. |
The following command and its sample output indicate that the application process has been started by the application user that was specified in the unit service file.
[root@localhost]# ps -ef | grep -i appStartCommand
A sample output is:
john 20845 1 0 15:29 ? 00:00:00 appStartCommand
When the resource is online, it appears as follows in the systemd context:
[root@localhost]# systemd-cgls └─system.slice ├─sample_app.service │ └─20845 appStartCommand ├─vcs.service │ ├─20280 /opt/VRTSvcs/bin/had │ ├─20288 /opt/VRTSvcs/bin/hashadow │ ├─20307 /opt/VRTSvcs/bin/HostMonitor -type HostMonitor -agdir / │ └─20308 /opt/VRTSvcs/bin/Application/ApplicationAgent -type Application