<?php
// continuous_report.php
// RJM Programming
// September, 2015
// Report on number of web server processes running

   $startdate = new DateTime();
   $rnow = $startdate->format("Y-m-d_H_i_s");
   $rhour = $startdate->format("Y-m-d_H");
   $rday = $startdate->format("Y-m-d");
   $rmonth = $startdate->format("Y-m");
   $ryear = $startdate->format("Y");
   exec("ps -e | wc -l | tr -d ' ' > creports/acontinuous.rpt" . $rnow . ".html; cp -f creports/acontinuous.rpt" . $rnow . ".html creports/acontinuous.rpt" . $rhour . ".html;  cp -f creports/acontinuous.rpt" . $rnow . ".html creports/acontinuous.rpt" . $rday . ".html;  cp -f creports/acontinuous.rpt" . $rnow . ".html creports/acontinuous.rpt" . $rmonth . ".html;  cp -f creports/acontinuous.rpt" . $rnow . ".html creports/acontinuous.rpt" . $ryear . ".html; ");
   exit
      
?>