2 #function get_comon_count()
4 # $url = "http://summer.cs.princeton.edu/status/tabulator.cgi?table=table_nodeview&format=nameonly";
5 # $count = `wget --quiet -O - "$url" | wc -l`;
8 #function get_comon_count_for($query)
10 # $url = "http://summer.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&format=nameonly&select='$query'";
11 # $count = `wget --quiet -O - "$url" | wc -l`;
14 #$total = get_comon_count();
15 #$alive = get_comon_count_for("lastcotop==0");
16 #$fc2 = get_comon_count_for("fcname==2");
17 #$fc4 = get_comon_count_for("fcname==4");
18 #$not_alive = $total - $alive;
19 #$nossh = get_comon_count_for("sshstatus>0||sshstatus<0");
20 #$unknown = abs($not_alive - $nossh);
21 #$time = date("D M j G:i:s");
22 #$monday_csv_list= trim(file_get_contents("monday.txt"));
23 #$monday_array = split(",", $monday_csv_list);
25 $bad_csv_list= trim(file_get_contents("badcsv.txt"));
26 $sarray = split(",", $bad_csv_list); # split on comma
28 $alpha_running = $sarray[0];
29 $prod_running = $sarray[1];
30 $oldboot_running = $sarray[2];
31 $alpha_debug = $sarray[3];
33 $prod_debug = $sarray[4];
34 $oldboot_debug = $sarray[5];
36 #$prod_since_monday = $alpha_running - $monday_array[0];
37 #$oldboot_since_monday = $monday_array[1] - $oldboot_running;
38 $monitor_total = $prod_running + $prod_debug + $down +$oldboot_running + $oldboot_debug + $alpha_running + $alpha_debug;
44 <table cellspacing=3-->
46 <th align=left>MONITOR</th>
47 <th align=right>Boot</th>
48 <th align=right>Debug</th>
49 <th align=right>Down</th>
53 <th align=left>Production 4.2</th>
54 <td bgcolor=lightgrey align=right><?php echo $alpha_running ?></td>
55 <td align=right><?php echo $alpha_debug + $prod_debug ?></td>
56 <td align=right><?php echo $down ?></td>
57 <td align=right><?php echo ($alpha_running + $alpha_debug + $prod_debug + $down) ?></td>
60 <th align=left>Production 4.1</th>
61 <td align=right><?php echo $prod_running ?></td>
62 <td align=right>--</td>
63 <td align=right>--</td>
64 <td align=right><?php echo ($prod_running) ?></td>
67 <th align=left>Old BootCD</th>
68 <td align=right><?php echo $oldboot_running ?></td>
69 <td align=right><?php echo $oldboot_debug ?></td>
70 <td align=right>--</td>
71 <td align=right><?php echo ($oldboot_running + $oldboot_debug) ?></td>
73 <th align=left>Sums</th>
74 <td align=right><?php echo $prod_running+$alpha_running+$oldboot_running ?></td>
75 <td align=right><?php echo $prod_debug+$oldboot_debug+$alpha_debug ?></td>
76 <td align=right>--</td>
77 <td bgcolor=lightgrey align=right><?php echo ($prod_running + $prod_debug + $down +$oldboot_running + $oldboot_debug + $alpha_running + $alpha_debug) ?></td>
81 <td align=right><?php echo sprintf("%.1f%%", ($prod_running+$alpha_running+$oldboot_running)/1.0/$monitor_total*100) ?></td>
82 <td align=right><?php echo sprintf("%.1f%%", (($prod_debug+$oldboot_debug+$alpha_debug)/1.0/$monitor_total*100)) ?></td>
83 <td align=right><?php echo sprintf("%.1f%%", ($down/1.0/$monitor_total*100)) ?></td>
88 <a target=_blank href="http://monitor.planet-lab.org/monitor/gadget.php">Direct Link</a>