User Tools

Site Tools


uphp:functions:process_list

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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+<badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-example:+Return an <html><b><span style="color:green">array<span style="color:black"></b></html> of the currently running scripts 
 + 
 +====Description==== 
 + 
 +<well size="sm"><html> 
 +<span style="font-size:125%;color:green">array 
 +<span style="color:black">process_list ( ) 
 +</html></well> 
 + 
 +====Parameters==== 
 + 
 +None 
 + 
 +====Return Values==== 
 + 
 +An array of arrays containing key/value pairs with information about each running process: 
 + 
 +^Key^Type^Value Description^ 
 +|pid|<html><b><span style="color:green">int</b></html>|Process ID, can be used with [[process_kill()]] to request termination| 
 +|start|<html><b><span style="color:green">int</b></html>|Run time of the script| 
 +|script|<html><b><span style="color:green">string</b></html>|Name of the running script| 
 +|line|<html><b><span style="color:green">int</b></html>|Line number of the script if applicable| 
 +|flags|<html><b><span style="color:green">int</b></html>|Internal process flags, see below| 
 + 
 +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> 
 +<pre><? 
 +  $process_list=process_list(); 
 +  print_r($process_list); 
 +?></pre> 
 +</code> 
 + 
 +Typical output for the above example: 
 + 
 +<code> 
 +[$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
 ) )
 +
 +</code>
  
-| 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 (ORas bit mask +[[process_kill()]] - Send kill request to a process
-| value | description | +
-| 1 | END flag, script is signaled to end | +
-| 16 | LOCKED - internal locks prevent the script from terminating | +
-| 64 | SENT_OUTPUT - output has already been started to standard output |+
  
uphp/functions/process_list.1494676863.txt.gz · Last modified: 2021/09/13 05:56 (external edit)