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; "); if (isset($_GET['fiftycheck']) && strpos($startdate->format("_i_"), "_50_") !== false) { // only keep 2 months worth exec("ksh -c 'for i in `find creports -name \"acontinuous.rpt????-??-??_??_??_??.html\" -mtime +62`; do rm -f \$i; done '"); } if (isset($_GET['forcecheck'])) { // only keep 2 months worth exec("ksh -c 'for i in `find creports -name \"acontinuous.rpt????-??-??_??_??_??.html\" -mtime +62`; do rm -f \$i; done '"); } exit ?>