Process Functions
processWait
Wait for processes not owned by this process to exit,
Usage
processWait processId [ --timeout seconds ] [ --signals signal ] [ --require ]
Wait for processes not owned by this process to exit, and send signals to terminate processes.
Location:
bin/build/tools/process.sh
Arguments
processId- Integer. Required. Wait for process ID to exit.--timeout seconds- Integer. Optional. Wait for this long after sending a signals to see if a process exits. If not supplied waits 1 second after each signal, then waits forever.--signals signal- CommaDelimitedList. Optional. Send each signal to processes, in order.--require- Flag. Optional. Require all processes to be alive upon first invocation.
Return codes
0- Success1- Environment error2- Argument error
processCountWatcher
Watch the number of processes matching
tokenand fail if
Usage
processCountWatcher [ --help ] [ --handler handler ] [ threshold ] [ ... ] [ --handler handler ] [ --quiet ] [ --hook hookName ] [ --sleep sleepTime ] [ --timeout timeoutTime ]
Watch the number of processes matching token and fail if it exceeds a threshold
Argument:
Location:
bin/build/tools/process.sh
Arguments
--help- Flag. Optional. Display this help.--handler handler- Function. Optional. Use this error handler instead of the default error handler.threshold- UnsignedInteger. Optional. If process count exceeds this threshold, run the hook and return 1....- Arguments. Optional. Pass these arguments to the hook.--handler handler- Function. Optional. Use this error handler instead of the default error handler.--quiet- Flag. Optional. Do not output a message when threshold is exceeded.--hook hookName- EmptyString. Optional. Run this hook. Defaults to `notify'--sleep sleepTime- PositiveInteger. Optional. Sleep time between checks in milliseconds.--timeout timeoutTime- PositiveInteger. Optional. Time out watching aftertimeoutTimemilliseconds.
Return codes
0- Sleep was interrupted1- Process count exceeded threshold
processMemoryUsage
Outputs value of resident memory used by a process, value
Usage
processMemoryUsage pid
Outputs value of resident memory used by a process, value is in kilobytes
Location:
bin/build/tools/process.sh
Arguments
pid- Integer. Required. Process ID of running process
Examples
> processMemoryUsage 23
Sample Output
423
Return codes
0- Success2- Argument error
processVirtualMemoryAllocation
Outputs value of virtual memory allocated for a process, value
Usage
processVirtualMemoryAllocation [ --help ] [ pid ]
Outputs value of virtual memory allocated for a process, value is in kilobytes
Location:
bin/build/tools/process.sh
Arguments
--help- Flag. Optional. Display this help.pid- Process ID of running process
Examples
processVirtualMemoryAllocation 23
Sample Output
423
Return codes
0- Success2- Argument error