title: Set CPU Affinity in PHP?
body: <p>Pretty straightforward question - is there a way to set the CPU affinity via PHP?  Any of the following will do:</p>
  
  <ul>
  <li>Setting the affinity of the current process via a PHP call.</li>
  <li>Setting the affinity of a specific PID via a PHP call.</li>
  <li>As a last resort, setting the affinity of a specific PID via a command-line tool.</li>
  </ul>
  
  <p>The only option I've found so far is the last one, using a tool named schedutils, and it seems it may only be supported on more recent kernels.</p>
  
  <p><a href="http://www.cyberciti.biz/tips/setting-processor-affinity-certain-task-or-process.html" rel="nofollow">Schedutils</a></p>