Mwinelands strace foo: Difference between revisions

From Cheatsheet
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Here is the gold
Here is the gold


  if ( $_SERVER['REMOTE_ADDR'] == '10.30.4.80' ) {
  if ( $_SERVER['REMOTE_ADDR'] == '10.30.6.16' ) {
       $file = 'pid.log';
       $file = 'pid.log';
       $current = getmypid();
       $current = getmypid();

Revision as of 01:51, 30 April 2016

Here is the gold

if ( $_SERVER['REMOTE_ADDR'] == '10.30.6.16' ) {
      $file = 'pid.log';
      $current = getmypid();
      file_put_contents($file, $current);
      sleep(7);
}


strace -Ff -s512 -Tt -o My-strace-results -p `cat pid.log`