⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 procsrv.script

📁 Software Testing Automation Framework (STAF)的开发代码
💻 SCRIPT
📖 第 1 页 / 共 5 页
字号:
End Date-Time  : <None>Return Code    : <None>:exmp.:p.:li.:hp2.Goal::ehp2. Query a process with handle 42 that has completed:p.:hp2.Syntax::ehp2.&nbsp; :xph.QUERY HANDLE 42:exph.:p.:hp2.Results::ehp2.  If the request was issued from thecommand line, the result in default format, could look like::xmp.Handle         : 42Handle Name    : Web TestsTitle          : TestAWorkload       : <None>Shell          : <None>Command        : D:/Tests/TestA.exeParms          : <None>Workdir        : D:/TestsFocus          : BackgroundUser Name      : <None>Key            : <None>PID            : 3285Start Mode     : AsyncStart Date-Time: 20051205-11:33:14End Date-Time  : 20051205-11:37:55Return Code    : 0:exmp.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.FREE:i3.process service:h3.FREE:p.When processes are STARTed asynchronously, the termination timestamp andreturn code are stored by STAF for later retrieval.  In order to free thesevalues, you use the PROCESS FREE command.  You may only free information forprocesses that are already stopped.  You may free the termination informationfor a single process, all the stopped processes of a given workload, or allstopped processes that have been started by STAF.:h4.Syntax:xmp.FREE <ALL | WORKLOAD <Name> | HANDLE <Handle>>:exmp.:p.:xph.ALL:exph. specifies that you want to free the termination informationfor all stopped processes.:p.:xph.WORKLOAD:exph. specifies that you want to free the terminationinformation for all processes that are part of a given workload. &varres.:p.:xph.HANDLE:exph. specifies that only the termination information for thespecified handle should be freed. &varres.:h4.Security:p.&seclvl. 4.:h4.Return Codes:p.All return codes from FREE are documented in :hdref refid=retcode..:h4.Results:p.:ul.:li.If the :xph.HANDLE:exph. option is specified, the terminationinformation will be freed for the specified handle, and theresult buffer will be empty.:p.:li.If the :xph.ALL:exph. or :xph.WORKLOAD:exph. option is specified,the result buffer will contain a marshalled:xph.<Map&colon.STAF/Service/Process/FreeInfo>:exph., representingthe statistics for the freed processes.The map is defined as follows::table cols='* * * *'.:tcap.Definition of map class STAF/Service/Process/FreeInfo:tnote text='Description'.This map class represents statistics forfreed processes.:thd.:c.Key Name:c.Display Name:c.Type:c.Format / Value:ethd.:row.:c.freedProcesses:c.Freed Processes:c.&stringObj.:c.:row.:c.totalProcesses:c.Total Processes:c.&stringObj.:c.:tnote text='Notes'.This map contains the number of processes for which terminationinformation was actually freed and the total number of processes.These two numbers will be different if some of the processes havenot yet been stopped or have not completed execution.:etnote.:etable.:eul.:h4.Examples:p.:ul.:li.:hp2.Goal::ehp2. Free the termination information for a processwith handle 42.:p.:hp2.Syntax::ehp2.&nbsp; :xph.FREE HANDLE 42:exph.:p.:hp2.Results::ehp2.  If the request is issued from the command line,the result, in default format, could look like::xmp.Freed Processes: 1Total Processes: 10:exmp.           :p.:li.:hp2.Goal::ehp2. Free the termination information for all theprocesses in the "Web Tests" workload.:p.:hp2.Syntax::ehp2.&nbsp; :xph.FREE WORKLOAD "Web Tests":exph.:p.:hp2.Results::ehp2.  If the request is issued from the command line,the result, in default format, could look like::xmp.Freed Processes: 2Total Processes: 17:exmp.           :p.:li.:hp2.Goal::ehp2. Free the termination information forall stopped processes.:p.:hp2.Syntax::ehp2.&nbsp; :xph.FREE ALL:exph.:p.:hp2.Results::ehp2.  If the request is issued from the command line,the result, in table format, could look like::xmp.Freed Processes: 15Total Processes: 16:exmp.:eul..*.*---------------------------------------------------------------------.*:i1.process termination notifications:ih1.service commands:ih2.NOTIFY REGISTER/UNREGISTER:i3.process service:h3 id=procreg.NOTIFY REGISTER/UNREGISTER:p.NOTIFY REGISTER/UNREGISTER allow you to either register or unregister toreceive a notification when a given process ends.:h4.Syntax:xmp.NOTIFY <REGISTER | UNREGISTER> ONENDOFHANDLE <Handle> &lbrk.MACHINE <Machine>&rbrk.       &lbrk.PRIORITY <Priority>&rbrk.  &lbrk.HANDLE <Handle> | NAME <Name>&rbrk.:exmp.:p.:xph.REGISTER:exph. indicates you want to register for a notificationwhen a process ends.  The queued message will have type "STAF/Process/End" andits message will contain a marshalled :xph.<Map>:exph. which represents thecompletion information for the process.  See tables :tref refid=STAFProcessEndTable.and :tref refid=ProcessReturnedFileTable. for the map definitions of aprocess completion message.:p.:xph.UNREGISTER:exph. indicates you want to unregister a process endnotification.:p.:xph.ONENDOFHANDLE:exph. indicates the handle of the process for which youwish to receive the notification. &varres.:p.:xph.MACHINE:exph. specifies the machine to which the notification shouldbe sent.  The default is the machine submitting the request. &varres.:p.:xph.PRIORITY:exph. specifies the priority of the notification message.The default is 5. &varres.:p.:xph.HANDLE:exph. specifies the handle to which the notification should besent.  The default is the handle of the process submitting the request.&varres.:p.:xph.NAME:exph. specifies the registered name of the process(es) to whichthe notification should be sent. &varres.:table id='STAFProcessEndTable' cols='* 2* *'.:tcap.Definition of map for "STAF/Process/End" type message:tnote text='Description'.This map represents process completion information.:thd.:c.Key Name:c.Type:c.Format / Value:ethd.:row.:c.handle:c.&stringObj.:c.:row.:c.endTimestamp:c.&stringObj.:c.&timestampFormat.:row.:c.rc:c.&stringObj.:c.:row.:c.key:c.&stringObj.:c.:row.:c.fileList:c.:xph.<List> of <Map>.:exph.  See :tref refid=ProcessReturnedFileTable. for themap definition.:c.:tnote text='Notes'.The value for "fileList" will contain a list of information about the filesrequested to be returned.  Files will be returned in the order of standard output,then standard error, then any files specified with the :xph.RETURNFILE:exph.option.  The value for "fileList" will be empty if none of the options:xph.RETURNSTDOUT:exph., :xph.RETURNSTDERR:exph., or :xph.RETURNFILE:exph. werespecified when the process was started.:etnote.:etable.:table id='ProcessReturnedFileTable' cols='* * *'.:tcap.Definition of map for returned files for a process:tnote text='Description'.This map class represents a file returned by the process.:thd.:c.Key Name:c.Type:c.Format / Value:ethd.:row.:c.rc:c.&stringObj.:c.:row.:c.data:c.&stringObj.:c.:tnote text='Notes'.For each file, a standard STAF return code indicating the success or failureof retrieving the file's contents is provided.  If the file's return codeis 0, then the data contained in the file is also provided.:etnote.:etable.:p.For example, suppose a PROCESS START COMMAND "java TestA" request wassubmitted by handle 43, and assume that the process completedsuccessfully at 20041019-17:03:48 and returned a process return code of 0.The queued STAF/PROCESS/END message will be a map that could look like thefollowing: :xmp.{  handle      : 43  endTimestamp: 20041019-17:03:48  rc          : 0  key         : <None>  fileList    : []}:exmp.:p.For example, suppose a :xph.PROCESS START COMMAND "java TestA" KEY 10 RETURNSTDOUTRETURNSTDERR:exph. request is submitted by handle 26 with key 10, and assume thatthe process completed successfully at 20041029-09:30:16 and returned a processreturn code of 3 and that the standard output of the process was simply"Success !!!", and that the standard error of the process was blank.The queued STAF/PROCESS/END message will be a map that could look likethe following: :xmp.{  handle      : 26  endTimestamp: 20041029-09:30:16  rc          : 3  key         : 10  fileList    : [    {      rc  : 0      data: Success !!!    }    {      rc  : 0      data:     }   ]}:exmp.:h4.Security:p.These commands require trust level 3.:h4.Return Codes:p.All return codes from NOTIFY REGISTER/UNREGISTER are documented in:hdref refid=retcode..:h4.Results:p.The result buffer will contain no data on return from a NOTIFYREGISTER/UNREGISTER command.:h4.Examples:p.:ul.:li.:hp2.Goal::ehp2. Register the current process for a priority 1 notificationwhen the process with handle 14 ends.:p.:hp2.Syntax::ehp2.&nbsp; :xph.NOTIFY REGISTER ONENDOFHANDLE 14 PRIORITY 1:exph.:p.:li.:hp2.Goal::ehp2. Register to have a process end notification sent to allprocesses with registered name ProcessHandler on machine EventControllerwhen process with handle 43 ends.:p.:hp2.Syntax::ehp2.&nbsp; :xph.NOTIFY REGISTER ONENDOFHANDLE 43 MACHINE EventController NAME ProcessHandler:exph.:p.:li.:hp2.Goal::ehp2. Unregister the event notification for handle 43 which is to besent when process with handle 12 ends.:p.:hp2.Syntax::ehp2.&nbsp; :xph.NOTIFY UNREGISTER ONENDOFHANDLE 12 HANDLE 43:exph.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.NOTIFY LIST:i3.process service:h3.NOTIFY LIST:p.NOTIFY LIST allows you to view the process end notification list for agiven process.:h4.Syntax:xmp.NOTIFY LIST ONENDOFHANDLE <Handle>:exmp.:p.:xph.ONENDOFHANDLE:exph. indicates the handle of the process for which youwish to view the notification list. &varres.:h4.Security:p.&seclvl. 2.:h4.Return Codes:p.All return codes from NOTIFY LIST are documented in :hdref refid=retcode..:h4.Results:p.The result buffer will contain a marshalled:xph. <List> of <Map&colon.STAF/Service/Process/Notifiee>:exph., representing the registered notifiees.The map is defined as follows::table cols='* * * *'.:tcap.Definition of map class STAF/Service/Process/Notifiee:tnote text='Description'.This map class represents a registered notifiee.:thd.:c.Key Name:c.Display Name:c.Type:c.Format / Value:ethd.:row.:c.priority:c.Priority.br(P):c.&stringObj.:c.:row.:c.machine:c.Machine:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -