8 my $dbh = nms::db_connect();
9 print $cgi->header(-type=>'text/html; charset=utf-8', -refresh=>'10; http://nms.tg07.gathering.org/mbd-status.pl');
14 <title>MBD status</title>
19 <p>Spill søkt etter siste 15 minutter:</p>
24 <th>Aktive servere</th>
28 my $q = $dbh->prepare('select description,sum(active_servers) as active_servers from (select distinct on (game,port) * from mbd_log where ts >= now() - interval \'10 minutes\' order by game,port,ts desc ) t1 group by game,description order by sum(active_servers) desc, description;');
30 while (my $ref = $q->fetchrow_hashref()) {
33 <td>$ref->{'description'}</td>
34 <td>$ref->{'active_servers'}</td>