aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/public/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'web/api/public/dhcp')
-rwxr-xr-xweb/api/public/dhcp5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/api/public/dhcp b/web/api/public/dhcp
index ea42b8f..88f1eb5 100755
--- a/web/api/public/dhcp
+++ b/web/api/public/dhcp
@@ -14,6 +14,11 @@ while ( my $ref = $q->fetchrow_hashref() ) {
my $sysname = $ref->{'sysname'};
$json{'dhcp'}{$ref->{'sysname'}} = $ref->{'time'};
}
+my $q2 = $nms::web::dbh->prepare("select sysname,count(distinct mac) as clients,count(distinct ip) as addresses,count(mac) as acks from dhcp natural join switches where $nms::web::when group by switches.sysname;");
+$q2->execute();
+while (my $ref = $q2->fetchrow_hashref()) {
+ $nms::web::json{'switches'}{$ref->{sysname}} = $ref;
+}
$nms::web::cc{'max-age'} = "10";
$nms::web::cc{'stale-while-revalidate'} = "30";