Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 Bundled Agents Reference Guide   

Process Agent

Starts, stops, and monitors a user-specified process.

Entry Points

  • Online---Starts the process with optional arguments.
  • Offline---Terminates the process with a SIGTERM. If the process does not exit, the agent sends a SIGKILL.
  • Monitor---Checks to see if the process is alive by scanning the process table for the name of the executable pathname and argument list.

Type Definition


type Process (
static str ArgList[] = { PathName, Arguments, UserName, Priority,
PidFile }

 str PathName
 str Arguments
 str UserName = root
 str Priority = 20
 str PidFile
)

Required Attribute

Required Attribute Description, Type and Dimension, Default, and Example

PathName

Defines complete pathname to access an executable program. This path includes the program name. If a script controls the process, the PathName defines the complete path to the shell.

Pathname must not exceed 80 characters.

  • Type and dimension: string-scalar
  • Example: "/usr/sbin/sendmail"

Optional Attribute

Optional Attribute Description, Type and Dimension, Default, and Example

Arguments

Passes arguments to the process. If a script controls the process, the script is passed as an argument. Separate multiple arguments with a single space. A string cannot accommodate more than one space between arguments, nor allow for leading or trailing whitespace characters. Arguments must not exceed 80 characters.

UserName

The user whose ID is used to run the process. The process along with the arguments must run the context of the specified user.

Type and Dimension: string-scalar

Default: "root"

Example: "user1"

Priority

Priority with which the process runs. It is effective only when the user is root. Range is 0 to 39 where a process with a priority 0 is the highest.

Type and Dimension: string-scalar

Default: "20"

Example: "35"

PidFile

File that stores process PID.

  • Type and dimension: string-scalar
  • Example: "/etc/mail/sendmail.pid"

Sample Configurations

Sample 1


Process sendmail1 (
 PathName = "/usr/sbin/sendmail"
 Arguments = "-bd -q30m"
 User = root
 Priority = 10
 PidFile = "/etc/mail/sendmail.pid"
)

Sample 2


include "types.cf"

cluster ProcessCluster (
.
.
.
group ProcessGroup (
 SystemList = { sysa, sysb }
 AutoStartList = { sysa }
 )

 Process Process1 (
  PathName = "/usr/local/bin/myprog"
  Arguments = "arg1 arg2"
  )

 Process Process2 (
  PathName = "/bin/csh"
  Arguments = "/tmp/funscript/myscript"
  )

// resource dependency tree 
//
//      group ProcessGroup
//      {
//      Process Process1
//      Process Process2
//      }


 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 Bundled Agents Reference Guide  
VERITAS Software Corporation
www.veritas.com