1*c29d5175SchristosThe following are examples of php_syscalls.d. 2*c29d5175Schristos 3*c29d5175SchristosThis is a simple script to count executed PHP functions and system calls. 4*c29d5175SchristosHere it traces an example program, Code/Php/func_abc.php 5*c29d5175Schristos 6*c29d5175Schristos# php_syscalls.d 7*c29d5175SchristosTracing... Hit Ctrl-C to end. 8*c29d5175Schristos^C 9*c29d5175Schristos PID FILE TYPE NAME COUNT 10*c29d5175Schristos 18419 func_abc.php func func_a 1 11*c29d5175Schristos 18419 func_abc.php func func_b 1 12*c29d5175Schristos 18419 func_abc.php func func_c 1 13*c29d5175Schristos 18419 func_abc.php func sleep 3 14*c29d5175Schristos 18419 httpd syscall nanosleep 3 15*c29d5175Schristos 16*c29d5175SchristosWhile tracing, four functions were called - func_a(), func_b(), func_c(), and 17*c29d5175Schristossleep. There were also three instances of the system call nanosleep(). 18*c29d5175Schristos 19*c29d5175SchristosThis script can provide an insight to how a PHP application is interacting 20*c29d5175Schristoswith the system, by providing both application function calls and system calls 21*c29d5175Schristosin the same output. 22*c29d5175Schristos 23