diff options
author | Knut Auvor Grythe <knut@auvor.no> | 2015-04-02 08:54:36 +0200 |
---|---|---|
committer | root <root@einstein.tg15.gathering.org> | 2015-04-02 08:54:36 +0200 |
commit | 9f03931fce78a2fe2a21852f7228ea093493d60f (patch) | |
tree | 432ee0724559a8c4d696eaec01ea306ab4c5b6b6 /web/nms.gathering.org/stromkart.pl | |
parent | d1eeb0c628ec5cbdb9649a241a02f97016b83015 (diff) |
Update all maps to use the poll2 table
Diffstat (limited to 'web/nms.gathering.org/stromkart.pl')
-rwxr-xr-x | web/nms.gathering.org/stromkart.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/nms.gathering.org/stromkart.pl b/web/nms.gathering.org/stromkart.pl index df92906..c0e4a3d 100755 --- a/web/nms.gathering.org/stromkart.pl +++ b/web/nms.gathering.org/stromkart.pl @@ -31,7 +31,7 @@ my $wht = $img->colorResolve(255, 255, 255); my $gry = $img->colorResolve(127, 127, 127); #my $q = $dbh->prepare('select switch,sysname,(select placement from placements where placements.switch=switches.switch) as placement,count((bytes_in > 0 and bytes_out > 0) or null) as active_ports,(max(last_poll_time) >= current_timestamp - interval \'2 minutes\') as fresh from switches natural left join get_current_datarate() natural join placements where switchtype like \'dlink3100%\' group by switch,sysname'); -my $q = $dbh->prepare(' select switch,sysname,(select placement from placements where placements.switch = switches.switch) as placement,count((operstatus = 1) or null) as active_ports from switches natural left join get_operstatus() natural join placements where ifdescr like \'ge-0/0/%\' group by switch,sysname'); +my $q = $dbh->prepare(' select switch,sysname,(select placement from placements where placements.switch = switches.switch) as placement,count((ifoperstatus = 1) or null) as active_ports from switches natural left join get_operstatus() natural join placements where ifdescr like \'ge-0/0/%\' group by switch,sysname'); $q->execute(); while (my $ref = $q->fetchrow_hashref()) { my $ports = $ref->{'active_ports'}; |