This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
uphp:functions:process_list [2017/05/13 12:01] admin created |
uphp:functions:process_list [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | array process_list() | + | ======process_list====== |
- | returns an array of arrays containing key-value pairs with information about each running process | + | < |
- | example: | + | Return an < |
+ | |||
+ | ====Description==== | ||
+ | |||
+ | <well size=" | ||
+ | <span style=" | ||
+ | <span style=" | ||
+ | </ | ||
+ | |||
+ | ====Parameters==== | ||
+ | |||
+ | None | ||
+ | |||
+ | ====Return Values==== | ||
+ | |||
+ | An array of arrays containing key/value pairs with information about each running process: | ||
+ | |||
+ | ^Key^Type^Value Description^ | ||
+ | |pid|< | ||
+ | |start|< | ||
+ | |script|< | ||
+ | |line|< | ||
+ | |flags|< | ||
+ | |||
+ | The internal process flags can be any of the following (OR) as a bit mask: | ||
+ | ^Value^Description^ | ||
+ | |1|END - script has been signaled to end| | ||
+ | |16|LOCKED - internal locks prevent the script from terminating| | ||
+ | |64|SENT_OUTPUT - output has already been started to standard output| | ||
+ | |||
+ | ====Example==== | ||
+ | |||
+ | <code php> | ||
+ | < | ||
+ | $process_list=process_list(); | ||
+ | print_r($process_list); | ||
+ | ?></ | ||
+ | </ | ||
+ | |||
+ | Typical output for the above example: | ||
+ | |||
+ | < | ||
+ | [$process_list] = Array ( | ||
[1] = Array ( | [1] = Array ( | ||
(int) [pid] => 1 | (int) [pid] => 1 | ||
- | (int) [start] => 331685 | + | (int) [start] => 245285 |
- | (string) [script] => ping.cgi | + | (string) [script] => process_list__x.cgi |
(int) [flags] => 0 | (int) [flags] => 0 | ||
) | ) | ||
+ | ) | ||
+ | </ | ||
- | | array key | type | value | | + | ====See Also==== |
- | | pid | int | process id, can be used with [[process_kill()]] to request termination| | + | |
- | | start | int | run time of the script | | + | |
- | | script | string | name of the script running | | + | |
- | | flags | int | internal process flags | | + | |
- | Flags could be any of the following | + | [[process_kill()]] - Send a kill request |
- | | value | description | | + | |
- | | 1 | END flag, script is signaled | + | |
- | | 16 | LOCKED - internal locks prevent the script from terminating | | + | |
- | | 64 | SENT_OUTPUT - output has already been started to standard output | | + | |