ops: show large numbers in human readable format

This commit is contained in:
Juha Sointusalo 2016-01-05 21:10:19 +02:00
parent 263e9ac701
commit 4c6a530d5e
1 changed files with 22 additions and 12 deletions

View File

@ -854,25 +854,29 @@ function show_host($host) {
row("CPU", "$host->p_vendor $host->p_model");
row("GFLOPS", number_format($host->p_fpops/1e9, 2));
row("GIOPS", number_format($host->p_iops/1e9, 2));
row("memory bandwidth", $host->p_membw);
$x = $host->p_membw/(1024*1024);
$y = number_format($x, 2);
row("Memory bandwidth", "$y MB/sec");
row("Operating System", "$host->os_name $host->os_version");
$x = $host->m_nbytes/(1024*1024);
$y = round($x, 2);
$y = number_format($x, 2);
row("Memory", "$y MB");
$x = $host->m_cache/1024;
$y = round($x, 2);
$y = number_format($x, 2);
row("Cache", "$y KB");
$x = $host->m_swap/(1024*1024);
$y = round($x, 2);
$y = number_format($x, 2);
row("Swap Space", "$y MB");
$x = $host->d_total/(1024*1024*1024);
$y = round($x, 2);
$y = number_format($x, 2);
row("Total Disk Space", "$y GB");
$x = $host->d_free/(1024*1024*1024);
$y = round($x, 2);
$y = number_format($x, 2);
row("Free Disk Space", "$y GB");
row("Avg network bandwidth (upstream)", "$host->n_bwup bytes/sec");
row("Avg network bandwidth (downstream)", "$host->n_bwdown bytes/sec");
$x = number_format($host->n_bwup/1024);
row("Avg network bandwidth (upstream)", "$x kB/sec");
$x = number_format($host->n_bwdown/1024);
row("Avg network bandwidth (downstream)", "$x kB/sec");
row("Average turnaround", days_string($host->avg_turnaround));
row("Number of RPCs", $host->rpc_seqno);
row("Last RPC", time_str($host->rpc_time));
@ -897,10 +901,16 @@ function show_workunit($wu) {
row("XML doc", "<pre>".htmlspecialchars($wu->xml_doc)."</pre>");
row("Application", "<a href=\"db_action.php?table=app&id=$wu->appid\">" . app_name_by_id($wu->appid) . " [".$wu->appid."]</a>");
row("Batch", $wu->batch);
row("Estimated FP Operations", $wu->rsc_fpops_est);
row("Max FP Operations", $wu->rsc_fpops_bound);
row("Max Memory Usage", $wu->rsc_memory_bound);
row("Max Disk Usage", $wu->rsc_disk_bound);
$x = number_format($wu->rsc_fpops_est/1e9, 2);
row("Estimated FP Operations", "$x GFLOPS");
$x = number_format($wu->rsc_fpops_bound/1e9, 2);
row("Max FP Operations", "$x GFLOPS");
$x = $wu->rsc_memory_bound/(1024*1024);
$y = number_format($x, 2);
row("Max Memory Usage", "$y MB");
$x = $wu->rsc_disk_bound/(1024*1024);
$y = number_format($x, 2);
row("Max Disk Usage", "$y MB");
row("Need validate?", ($wu->need_validate?"yes [":"no [").$wu->need_validate."]");
row("Canonical resultid",
"<a href=\"db_action.php?table=result&id=$wu->canonical_resultid\">".$wu->canonical_resultid."</a>");