Title: Process Manager Interface Narayan Desai, Rusty Lusk, Rick Bradshaw
1Process Manager Interface Narayan Desai, Rusty
Lusk, Rick Bradshaw
2Outline
- PM Functionality
- PM Syntax
- PM Commands
- PM Datatypes
- PM Events
- PM Examples
- PM BNF
- PM Schema
3Process Manager Functionality
- Starts process groups, with specification of
environments of application processes, either
collectively or on a process-by-process basis - Executable
- Arguments
- Environment variables
- User
- Resource limits
- Hosts for each process
- Working directory
- Queries the state of a running process group,
returning some startup parameters - Delivers signals to all processes in a process
group - Terminates a process group
- After process group exit, can wait on the group
to collect exit codes and output.
4Process Manager Syntax
- The Process Manager uses the less restricted
syntax style presented elsewhere - Each message to it does three things
- Describes a process group specification to be
matched or created - Conveys a command, with arguments
- Specifies an object to be returned
5Process Manager Commands
- CreateProcessGroup
- Takes as input a ProcessGroupSpecification object
- Returns a PGID
- GetProcessGroup
- Takes as input a ProcessGroup object which is
matched against - Returns a ProcessGroups container object
containing requested fields from matched process
group instances - SignalProcessGroup
- Takes as input a Process Group object which is
matched against - Takes as argument a signal name and the scope of
the signal (top-level processes or also forkees) - Returns requested fields from the process groups
signaled
6Process Manager Commands (cont.)
- KillProcessGroup
- Terminates matching process groups
- Best effort to really kill processes, which may
require repeated signalling - Returns the process groups matched
- WaitProcessGroup
- Returns exit code information and stream output
from matching completed process groups - Purges such information from the Process Manager
state
7Process Manager Datatypes
- ProcessGroupSpecification
- Used as input to CreateProcessGroup
- ProcessGroup
- Used as matching description and returned
description in other commands
8Process Manager Events
- Generated when a process group is successfully
started - ltEventgt
- ltComponentgtprocess-managerlt/Componentgt
- ltMessagegtProcessStartlt/Messagegt
- ltDatagt29lt/Datagt
- lt/Eventgt
- Generated when a process group terminates
- ltEventgt
- ltComponentgtprocess-managerlt/Componentgt
- ltMessagegtProcessEndlt/Messagegt
- ltDatagt29lt/Datagt
- lt/Eventgt
9Process Manager Examples - 1
- ltCreateProcessGroupgt
- ltProcessGroupSpecificationgt
- ltUsergtdesailt/Usergt
- ltSizegt8lt/Sizegt
- ltExecutablegt/bin/falselt/Executablegt
- ltCWDgt/tmplt/CWDgt
- ltDiversionsgt
- ltDiversiongt
- ltRangegt6-7lt/Rangegt
- ltExecutablegt/bin/truelt/Executablegt
- ltEnvironmentgt
- ltVariablegt
- ltNamegtLD_LIBRARY_PATHlt/Namegt
- ltValuegt/local/liblt/Valuegt
- lt/Variablegt
- lt/Environmentgt
- ltArgumentsgt
10Process Manager Examples - 2
- ltArgumentgt-vlt/Argumentgt
- lt/Argumentsgt
- lt/Diversiongt
- lt/Diversionsgt
- ltHostSpecificationgt
- ltModegtUnorderedlt/Modegt
- ltValuegtccn1
- ccn2
- ccn3
- ccn4
- ccn5
- ccn6
- ccn7
- ccn8
- lt/Valuegt
- lt/HostSpecificationgt
- lt/ProcessGroupSpecificationgt
- lt/CreateProcessGroupgt
11Process Manager Examples - 3
- ltGetProcessGroupgt
- ltProcessGroupgt
- ltPGIDgt29lt/PGIDgt
- ltProcessesgt
- ltProcessgt
- ltHost match'false'/gt
- lt/Processgt
- lt/Processesgt
- lt/ProcessGroupgt
- lt/GetProcessGroupgt
12Process Manager Examples - 4
- ProcessGroupsgt
- ltProcessGroupgt
- ltPGIDgt29lt/PGIDgt
- ltProcessesgt
- ltProcessgt
- ltHostgtccn1lt/Hostgt
- lt/Processgt
- ltProcessgt
- ltHostgtccn2lt/Hostgt
- lt/Processgt
- ltProcessgt
- ltHostgtccn3lt/Hostgt
- lt/Processgt
- ltProcessgt
- ltHostgtccn4lt/Hostgt
- lt/Processgt
- ltProcessgt
- ltHostgtccn5lt/Hostgt
- lt/Processgt
13Process Manager Examples - 5
- ltGetProcessGroupgt
- ltProcessGroupgt
- ltPGIDgt29lt/PGIDgt
- ltStatus match'false'/gt
- lt/ProcessGroupgt
- lt/GetProcessGroupgt
- ltProcessGroupsgt
- ltProcessGroupgt
- ltPGIDgt29lt/PGIDgt
- ltStatusgtFinishedlt/Statusgt
- lt/ProcessGroupgt
- lt/ProcessGroupsgt
14Process Manager Examples - 6
- ltWaitProcessGroupgt
- ltProcessGroupgt
- ltPGIDgt29lt/PGIDgt
- ltExitStatusgt
- ltStatusgt
- ltCode negate'true'gt0lt/Codegt
- ltHost match'false'/gt
- lt/Statusgt
- lt/ExitStatusgt
- ltOutputgt
- ltStreamgt
- ltName op're'gt stdout stderr lt/namegt
- ltValue match'false'/gt
- lt/Streamgt
- lt/Outputgt
- lt/ProcessGroupgt
- lt/WaitProcessGroupgt
15Process Manager Examples - 7
- ltProcessGroupsgt
- ltProcessGroupgt
- ltPGIDgt29lt/PGIDgt
- ltExitStatusgt
- ltStatusgt
- ltHostgtccn2lt/Hostgt
- ltCodegt1lt/Codelt/Hostgt
- lt/Statusgt
- ltStatusgt
- ltHostgtccn6lt/Hostgt
- ltCodegt255lt/Codegt
- lt/Statusgt
- lt/ExitStatusgt
- ltOutputgt
- ltStreamgt
- ltNamegtstdoutlt/Namegt
16Process Manager Examples - 8
- ltValuegtprocess 0 on ccn1
- process 1 on ccn2
- process 2 on ccn3
- process 3 on ccn4
- process 4 on ccn5
- process 5 on ccn6
- process 6 on ccn7
- process 7 on ccn8
- lt/Valuegt
- lt/Streamgt
- ltStreamgt
- ltNamegtstderrlt/Namegt
- ltValue/gt
- lt/Streamgt
- lt/Outputgt
- lt/ProcessGroupgt
- lt/ProcessGroupsgt
17Process Manager BNF - 1
- InMsg CreateCommand Query
- CreateCommand ltCreateProcessGroupgt
PGSpecification -
lt/CreateProcessGroupgt - PGSpecification ltProcessGroupSpecificationgt
PGSattrs -
lt/ProcessGroupSpecificationgt - PGSattrs PGSattr PGSattr PGSattrs
- PGSattr ltFieldNamegtFieldValuelt/FieldNam
egt - Query ltArgCmd Argumentsgt ProcessGroup
lt/ArgCmdgt - ltCommandgt ProcessGroup
lt/Commandgt - Command KillProcessGroup GetProcessGroup
WaitProcessGroup - ArgCmd SignalProcessGroup
- Arguments Argument Argument
Arguments - Argument identifieridentifier
- ProcessGroup ltProcessGroupgt Fields
lt/ProcessGroupgt - Fields Field Field Fields
- MultiField MultiField
Fields
18Process Manager BNF - 2
- Field ltFieldNamegt FieldValue
lt/FieldNamegt - FieldName PGIDUserSizeExecutable
- FieldValue identifier
- MultiField ltFieldGroupgt MFields
lt/FieldGroupgt - MFields MField MField MFields
- MField ltMFName QualifiersgtMFValuelt/MF
Namegt - Qualifiers Qualifier Qualifiers
- Qualifier BooleanKeyBooleanValue
- StringKeyStringValue
- BooleanKey 'negate' 'match' 'return'
- BooleanValue 'true' 'false'
- StringKey 'op'
- StringValue 'eq' 'ne' 'lt' 'gt'
'le' 'ge' 'range' 're' - MFName HostSpec Environment Diversions
- MFValue identifier
19Process Manager Schema - 1
- ltxsdschema xmlnsxsd"http//www.w3.org/2001/XMLS
chema" xmllang"en"gt - ltxsdannotationgt
- ltxsddocumentationgt
- Process Manager component schema
- SciDAC SSS project, 2004
- Andrew Lusk alusk_at_mcs.anl.gov
- Narayan Desai desai_at_mcs.anl.gov
- lt/xsddocumentationgt
- lt/xsdannotationgt
- ltxsdsimpleType name'BooleanType'gt
- ltxsdrestriction base'xsdstring'gt
- ltxsdpattern value'truefalse'/gt
- lt/xsdrestrictiongt
- lt/xsdsimpleTypegt
- ltxsdsimpleType name'IntegerOps'gt
- ltxsdrestriction base'xsdstring'gt
- ltxsdpattern value'eqltgtrangere'/gt
20Process Manager Schema - 2
- ltxsdsimpleType name'Signals'gt
- ltxsdrestriction base'xsdstring'gt
- ltxsdpattern
- value'ABRTALRMBUSCHLDCLDCONTFPEHUPI
LLINTIOIOTKILLPIPEPOLLPROFPWRQUITSEGVST
OPSYSTERMTRAPTSTPTTINTTOUURGUSR1USR2VTAL
RMWINCHXCPUXFSZ'/gt - lt/xsdrestrictiongt
- lt/xsdsimpleTypegt
- ltxsdattributeGroup name'BaseLRSQuery'gt
- ltxsdattribute name'match'
type'BooleanType'/gt - ltxsdattribute name'negate'
type'BooleanType'/gt - ltxsdattribute name'return'
type'BooleanType'/gt - lt/xsdattributeGroupgt
- ltxsdcomplexType name'IntegerQueryAttribute'gt
- ltxsdsimpleContentgt
- ltxsdextension base'xsdinteger'gt
- ltxsdattributeGroup ref'BaseLRSQuery'/gt
- ltxsdattribute name'op'
type'IntegerOps'/gt - lt/xsdextensiongt
21Process Manager Schema - 3
- ltxsdextension base'xsdstring'gt
- ltxsdattributeGroup ref'BaseLRSQuery'/gt
- ltxsdattribute name'op'
type'IntegerOps'/gt - lt/xsdextensiongt
- lt/xsdsimpleContentgt
- lt/xsdcomplexTypegt
- ltxsdcomplexType name'ProcessQueryType'gt
- ltxsdsequencegt
- ltxsdelement name'Host' type'StringQueryAt
tribute' minOccurs'0'/gt - ltxsdelement name'PID' type'StringQueryAtt
ribute' minOccurs'0'/gt - ltxsdelement name'Session'
type'StringQueryAttribute' minOccurs'0'/gt - lt/xsdsequencegt
- lt/xsdcomplexTypegt
- ltxsdcomplexType name'ProcessSet'gt
- ltxsdchoice minOccurs'1'gt
- ltxsdelement name'Process'
type'ProcessQueryType'/gt - lt/xsdchoicegt
22Process Manager Schema - 4
- ltxsdelement name'Size' type'IntegerQueryA
ttribute' minOccurs'0'/gt - ltxsdelement name'User' type'StringQueryAt
tribute' minOccurs'0'/gt - ltxsdelement name'Status'
type'StringQueryAttribute' minOccurs'0'/gt - ltxsdelement name'Processes'
type'ProcessSet' minOccurs'0'/gt - lt/xsdsequencegt
- lt/xsdcomplexTypegt
- ltxsdcomplexType name'PGQuery'gt
- ltxsdchoice minOccurs'1' maxOccurs'unbounded
'gt - ltxsdelement name'ProcessGroup'
type'ProcessGroupQuery'/gt - lt/xsdchoicegt
- lt/xsdcomplexTypegt
- ltxsdelement name'GetProcessGroup'
type'PGQuery'/gt - ltxsdelement name'KillProcessGroup'
type'PGQuery'/gt - ltxsdelement name'WaitProcessGroup'
type'PGQuery'/gt - ltxsdelement name'SignalProcessGroup'gt
- ltxsdcomplexTypegt
23Notes