function jobstats_summary($db, $system, $start_date, $end_date) { $result = get_metric($db, $system, "", "cpuhours", $start_date, $end_date); $result->fetchInto($row); $jobcount = $row[0]; $cpuhours = $row[1]; echo "<P><B>" . $jobcount . " jobs run<BR>\n"; echo $cpuhours . " CPU-hours consumed"; $nproc = nprocs($system); if ($nproc > 0) { $data = ndays($db, $system, $start_date, $end_date); $ndays = $data[0]; $cpuhours_avail = $data[1]; if ($ndays > 0) { $avgutil = 100.0 * $cpuhours / $cpuhours_avail; printf(" (avg. %6.2f%% utilization over %d days)", $avgutil, $ndays); } } echo "<BR>\n"; $usercount = get_metric($db, $system, "", "usercount", $start_date, $end_date); $usercount->fetchInto($counts); $nusers = $counts[1]; $ngroups = $counts[2]; echo $nusers . " distinct users, " . $ngroups . " distinct groups"; echo "</B></P>\n"; }
function nprocs($system) { if ($system == 'amd') { return 256; } if ($system == 'apple') { return 64; } # if ( $system=='bale' ) return 110; if ($system == 'bale') { return 174; } if ($system == 'coe') { return 60; } if ($system == 'ipf') { return nprocs('ipf-noaltix') + nprocs('ipf-altix'); } if ($system == 'ipf-altix') { return 64; } if ($system == 'ipf-noaltix') { return nprocs('ipf-myri') + nprocs('ipf-bigmem'); } # if ( $system=='ipf-oldmyri' ) return 256; if ($system == 'ipf-oldmyri') { return 128; } if ($system == 'ipf-newmyri') { return 220; } # if ( $system=='ipf-bigmem' ) return 40; if ($system == 'ipf-bigmem') { return 16; } if ($system == 'ipf-myri') { return nprocs('ipf-oldmyri') + nprocs('ipf-newmyri'); } if ($system == 'ipf+mck') { return nprocs('ipf'); } if ($system == 'ipf+mck-altix') { return nprocs('ipf-altix'); } if ($system == 'ipf+mck-noaltix') { return nprocs('ipf-noaltix'); } if ($system == 'ipf+mck-bigmem') { return nprocs('ipf-bigmem'); } if ($system == 'ipf+mck-oldmyri') { return nprocs('ipf-oldmyri'); } if ($system == 'mck') { return nprocs('mck-noaltix') + nprocs('mck-altix'); } if ($system == 'mck-altix') { return 32; } if ($system == 'mck-noaltix') { return nprocs('mck-myri') + nprocs('mck-bigmem'); } if ($system == 'mck-bigmem') { return 40; } if ($system == 'mck-myri') { return 256; } if ($system == 'opt') { return 1392; } if ($system == 'piv') { return nprocs('piv-ib') + nprocs('piv-noib'); } if ($system == 'piv-ib') { return 224; } # if ( $system=='piv-noib' ) return 288; if ($system == 'piv-noib') { return 56; } if ($system == 'x1') { return 48; } return 0; }