1*c29d5175SchristosThe following are examples of php_flow.d. 2*c29d5175Schristos 3*c29d5175SchristosThis is a simple script to trace the flow of PHP functions. 4*c29d5175SchristosHere it traces the example program, Code/Php/func_abc.php 5*c29d5175Schristos 6*c29d5175Schristos# php_flow.d 7*c29d5175Schristos C TIME(us) FILE -- FUNC 8*c29d5175Schristos 0 3645535409575 func_abc.php -> func_a 9*c29d5175Schristos 0 3645535409653 func_abc.php -> sleep 10*c29d5175Schristos 0 3645536410511 func_abc.php <- sleep 11*c29d5175Schristos 0 3645536410536 func_abc.php -> func_b 12*c29d5175Schristos 0 3645536410557 func_abc.php -> sleep 13*c29d5175Schristos 0 3645537420627 func_abc.php <- sleep 14*c29d5175Schristos 0 3645537420652 func_abc.php -> func_c 15*c29d5175Schristos 0 3645537420673 func_abc.php -> sleep 16*c29d5175Schristos 0 3645538430106 func_abc.php <- sleep 17*c29d5175Schristos 0 3645538430125 func_abc.php <- func_c 18*c29d5175Schristos 0 3645538430134 func_abc.php <- func_b 19*c29d5175Schristos 0 3645538430143 func_abc.php <- func_a 20*c29d5175Schristos^C 21*c29d5175Schristos 22*c29d5175SchristosThe fourth column is indented by 2 spaces to show when a new function begins. 23*c29d5175SchristosThis shows which function is calling which - the output above begins by 24*c29d5175Schristosshowing that func_a() began; slept, and returned from sleep; and then called 25*c29d5175Schristosfunc_b(). 26*c29d5175Schristos 27*c29d5175SchristosThe TIME(us) column shows time from boot in microseconds. 28*c29d5175Schristos 29*c29d5175SchristosThe FILE column shows the file that was being executed. 30*c29d5175Schristos 31*c29d5175SchristosIf the output looks strange, check the CPU "C" column - if it changes, 32*c29d5175Schristosthen the output is probably shuffled. See Notes/ALLsnoop_notes.txt for 33*c29d5175Schristosdetails and suggested workarounds. 34*c29d5175Schristos 35*c29d5175SchristosSee Notes/ALLflow_notes.txt for important notes about reading flow outputs. 36*c29d5175Schristos 37