📄 procsrv.script
字号:
:ul compact.:li.Find STAFProc.exe (e.g. C:\STAF\bin\STAFProc.exe) via Windows Explorer andright mouse click on it. To change just this one instance of starting STAFProc,select "Run as administrator".:li.Or, find STAFProc.exe (e.g. C:\STAF\bin\STAFProc.exe) via Windows Explorer andright mouse click on it. Select "Properties" and then select the "Compatibility" tab,and check the box under "Privilege Level" labeled "Run the program as an administrator"and select OK. Now, any time you start STAFProc it will be run as an administrator.:li.Or find "Command Prompt" and right mouse on it and select "Run as administrator".Any program such as STAFProc that is run from a "Administrator: Command Prompt", will berun as an administrator.:eul.:eol.:p.There are operating system limitations on how many processes can run concurrently under adifferent user in the same desktop. If you get RC 10 with OS RC 1816, and the user namethat the process is being run under is not a member of the Administrator group, then youmay want to give it the "Increase quotas" user right so that more processes canrun concurrently. See :hdref refid=winuserrights. for more information on how to changeuser rights assignments.:p.If you are having problems starting a process under a different user name, use the Trace serviceto enable error and warning trace points to see if you get more information..*---------------------------------------------------------------------:ih1.process:i2.Changing User Rights Assignments:h4 id=winuserrights.Changing User Rights Assignments:p.This information is provided to help you change user rights assignments as needed tostart a process under a different user name.:p.On Windows Vista systems, to view or modify user rights assignments in the local security policy,perform the following::ol compact.:li.Open the Control Panel, from the Classic view, double click on "Administrative Tools".:li.Double click on "Local Security Policy".:li.Double click on "Local Policies".:li.Click on "User Rights Assignment".:li.Double click on the user right you want to view or modify.:li.Add any users or groups you require.:li.If the rights for a user currently logged on are changed, the user mustlogoff for the changes to take effect.:eol.:p.On Windows XP systems, to view or modify user rights assignments in the local security policy,when logged on as an administrator, perform the following::ol compact.:li.Open the Control Panel, from the Classic view, double click on "Administrative Tools".:li.Double click on "Local Security Policy".:li.Click on "User Rights Assignment".:li.Double click on the user right you want to view or modify.:li.Add any users or groups you require.:li.If the rights for a user currently logged on are changed, the user mustlogoff for the changes to take effect.:eol.On Windows 2000 systems, to view or modify user rights assignments in the local security policy,when logged on as an administrator, perform the following::ol compact.:li.Click on Start -> Settings -> Control Panel and double click on "Administrative Tools".:li.Double click on "Local Security Policy" and double click on "Local Policies".:li.Double click on "User Rights Assignment".:li.Double click on the user right you want to view or modify.:li.Add any user names you require.:li.If the rights for a user currently logged on are changed, the user mustlogoff for the changes to take effect.:eol.On Windows NT systems, to view or modify user rights assignments in the local security policy,when logged on as an administrator, perform the following::ol compact.:li.Click on Start -> Programs -> Administrative Tools (Common) -> User Manager.:li.On the User Manager's menu bar, click on Policies -> User Rights.:li.Check the "Show Advanced User Rights" box.:li.Display the list of Rights.:li.Double click on the user right in the list that you want to view or modify.:li.The users and groups who have this right are displayed in the "Grant to:" list.:li.Add any user names you require.:li.If the rights for a user currently logged on are changed, the user mustlogoff for the changes to take effect.:eol..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.STOP:i3.process service:h3 id=psstop.STOP:p.STOP allows you to stop a process that was started via START. You maystop a single process, all processes that are part of a given workload, or allprocesses started by STAF.:h4.Syntax:xmp.STOP <ALL CONFIRM | WORKLOAD <Name> | HANDLE <Handle>> &lbrk.USING <Method>&rbrk.:exmp.:p.:xph.ALL:exph. specifies that you want to stop all running processes thatSTAF has STARTed. If you wish to do this, you must also specify the:xph.CONFIRM:exph. option.:p.:xph.WORKLOAD:exph. specifies that you want to stop all processes that arepart of a given workload. &varres.:p.:xph.HANDLE:exph. specifies that only the specified handle should be stopped. &varres.:p.:xph.USING:exph. specifies the method used to stop the process. &varres.The following methods are supported&colon.:ul compact.:li.SIGKILLALL - This unconditionally stops the process and all of itschildren processes. On Unix systems, this sends a SIGKILL signal to theprocess and all of its children processes. This is not supported on Windowssystems,.*or OS/2,although WM_CLOSE has a similar effect for Windows console applications.This is the default for Unix systems.:li.SIGKILL - This unconditionally stops the process. On Unix systems, thissends a SIGKILL signal to the process. On Windows, this calls TerminateProcess()..*On OS/2, this calls DosStopSession().:hp2.Note&colon.:ehp2. This is the onlyguaranteed way to stop a process. In particular, most, if not all, Windows GUIapplications can only be killed this way. This is the default for Windows..* and OS/2.:li.SIGTERM - On Unix systems, this sends a SIGTERM signal to the process.On Windows systems, this sends a CTRL-Break event to the process (note, the process musthave been STARTed with the SAMECONSOLE option for this to work)..*On OS/2, this is not supported.:li.SIGINT - On Unix systems, this sends a SIGINT signal to the process.On Windows systems, this sends a CTRL-C event to the process (note, theprocess must have been STARTed with the SAMECONSOLE option for this to work)..*On OS/2, this is not supported.:li.WM_CLOSE - On Windows systems, this sends a WM_CLOSE message to theapplication. This is particularly useful for stopping console applicationswhich spawn numerous child processes. This will not work on consoleapplications started using the SAMECONSOLE option.This is not supported on Unix systems..*or OS/2.:eul.:h4.Security:p.&seclvl. 4.:h4.Return Codes:p.All return codes from STOP are documented in :hdref refid=retcode..:h4.Results:p.:ul.:li.If the :xph.HANDLE:exph. option is specified, the result bufferwill 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/StopInfo>:exph. defined as follows::table cols='* * * *'.:tcap.Definition of map class STAF/Service/Process/StopInfo:tnote text='Description'.This map class represents statistics forstopped processes.:thd.:c.Key Name:c.Display Name:c.Type:c.Format / Value:ethd.:row.:c.stoppedProcesses:c.Stopped Processes:c.&stringObj.:c.:row.:c.totalProcesses:c.Total Processes:c.&stringObj.:c.:tnote text='Notes'.This map contains the number of processes actually stoppedand the total number of processes. These two numbers will be different if some of the processes have already been stopped orhave already completed execution on their own.:etnote.:etable.:eul.:h4.Examples:p.:ul.:li.:hp2.Goal::ehp2. Stop process with handle 42.:p.:hp2.Syntax::ehp2. :xph.STOP HANDLE 42:exph.:p.:hp2.Results::ehp2. If the request is submitted from thecommand line, the result, in default format, could look like::xmp.Stopped Processes: 1Total Processes: 3:exmp.:p.:li.:hp2.Goal::ehp2. Stop all processes in the Web Tests workload.:p.:hp2.Syntax::ehp2. :xph.STOP WORKLOAD "Web Tests":exph.:p.:hp2.Results::ehp2. If the request is submitted from thecommand line, the result, in default format, could look like::xmp.Stopped Processes: 5Total Processes: 18:exmp.:p.:li.:hp2.Goal::ehp2. Stop all processes currently running via STAF.:p.:hp2.Syntax::ehp2. :xph.STOP ALL CONFIRM:exph.:p.:hp2.Results::ehp2. If the request is submitted from thecommand line, the result, in default format, could look like::xmp.Stopped Processes: 16Total Processes: 16:exmp.:p.:li.:hp2.Goal::ehp2. Gracefully stop process with handle 113 using the SIGTERM method.:p.:hp2.Syntax::ehp2. :xph.STOP HANDLE 113 USING SIGTERM:exph.:p.:hp2.Results::ehp2. If the request is submitted from thecommand line, the result, in default format, could look like::xmp.Stopped Processes: 1Total Processes: 10:exmp.:p.:li.:hp2.Goal::ehp2. Unconditionally stop process with handle 17.:p.:hp2.Syntax::ehp2. :xph.STOP HANDLE 17 USING SIGKILL:exph.:p.:hp2.Results::ehp2. If the request is submitted from thecommand line, the result, in default format, could look like::xmp.Stopped Processes: 1Total Processes: 5:exmp.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.LIST:i3.process service:h3.LIST:p.LIST allows you to obtain information about all of the processes startedvia STAF, or only those processes started via STAF that are currentlyrunning, or only those processes started via STAF that have completed.You may get information about any process started in :xph.WAIT:exph. modethat is still running and/or about any process started in :xph.ASYNC:exph.mode that has not yet been freed.:p.You can also list the operational settings for the Process service.:h4.Syntax:xmp.LIST &lbrk.HANDLES&rbrk. &lbrk.RUNNING&rbrk. &lbrk.COMPLETED&rbrk. &lbrk.WORKLOAD <Name>&rbrk. &lbrk.LONG&rbrk. :exmp.or:xmp.LIST SETTINGS:exmp.:p.:xph.HANDLES:exph. specifies that you want information for process handles.:p.:xph.RUNNING:exph. specifies that you only want information for processesthat are currently running.:p.:xph.COMPLETED:exph. specifies that you only want information for processesstarted in :xph.ASYNC:exph. mode that have completed, but have not yet beenfreed.:p.:xph.WORKLOAD:exph. specifies that you want information for processesthat are part of a given workload. &varres.:p.:xph.LONG:exph. specifies that you want to list more detailed informationfor the processes.:p.:xph.SETTINGS:exph. specifies that you want to list the currentoperational settings for the Process service.:h4.Security:p.&seclvl. 2.:h4.Return Codes:p.All return codes from LIST are documented in :hdref refid=retcode..:h4.Results:p.On successful return::ul.:li.If option :xph.LONG:exph. is not specified (and option :xph.SETTINGS:exph.is not speciifed), the result buffer will containa marshalled :xph.<List> of <Map&colon.STAF/Service/Process/ProcessListInfo>:exph.representing processes started in :xph.WAIT:exph. mode that are stillrunning and/or processes started in :xph.ASYNC:exph. mode that have notyet been freed. The map is defined as follows: :table cols='* * * 3*'.:tcap.Definition of map class STAF/Service/Process/ProcessListInfo:tnote text='Description'.This map class represents a process.:thd.:c.Key Name:c.Display Name:c.Type:c.Format / Value:ethd.:row.:c.handle:c.Handle.br(H#):c.&stringObj.:c.:row.:c.command:c.Command:c.&stringObj.:c.&maskPrivate.:row.:c.startTimestamp:c.Start Date-Time:c.&stringObj.:c.×tampFormat.:row.:c.endTimestamp:c.End Date-Time:c.&stringObj. | &noneObj.:c.×tampFormat.:row.:c.rc:c.Return Code.br(RC):c.&stringObj | &noneObj.:c.:tnote text='Notes'.The value for "End Date-Time" and "Return Code" will be &noneObj. ifthe process is still running.:etnote.:etable.:p.:li.If option :xph.LONG:exph. is specified, the result buffer will containa marshalled :xph.<List> of <Map&colon.STAF/Service/Process/ProcessListLong>:exph.representing more detailed information about processes started in :xph.WAIT:exph. modethat are still running and/or processes started in :xph.ASYNC:exph. mode that have notyet been freed. The map is defined as follows: :table cols='* * * 3*'.:tcap.Definition of map class STAF/Service/Process/ProcessListLong:tnote text='Description'.This map class represents detailed information for a process.:thd.:c.Key Name:c.Display Name:c.Type:c.Format / Value:ethd.:row.:c.handle:c.Handle.br(H#):c.&stringObj.:c.:row.:c.workload:c.Workload:c.&stringObj | &noneObj.:c.:row.:c.command:c.Command:c.&stringObj.:c.&maskPrivate.:row.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -