aboutsummaryrefslogtreecommitdiffstats
path: root/munin/clients_connected.pl
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-02-26 10:59:08 +0100
committerKristian Lyngstol <kristian@bohemians.org>2016-02-26 10:59:08 +0100
commit9da864a8da29082369cdd2dd91a735b03577a117 (patch)
tree543d881f3746ddd4805dd0da449783eb42a8a92c /munin/clients_connected.pl
parent9ecc4690b2546ac117204207bec21ee1f6d585cf (diff)
Archive old/unused things
Diffstat (limited to 'munin/clients_connected.pl')
-rwxr-xr-xmunin/clients_connected.pl26
1 files changed, 0 insertions, 26 deletions
diff --git a/munin/clients_connected.pl b/munin/clients_connected.pl
deleted file mode 100755
index 5301c63..0000000
--- a/munin/clients_connected.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /usr/bin/perl -I/root/tgmanage/include
-use strict;
-use warnings;
-use lib 'include';
-use nms;
-use Data::Dumper::Simple;
-
-my $dbh = nms::db_connect();
-$dbh->{AutoCommit} = 0;
-
-my $active_clients = $dbh->prepare("select family(address), count(distinct(mac)) from seen_mac where family(address) in (6,4) and seen >= now() - INTERVAL '1 hour' group by family(address);")
- or die "Can't prepare query: $!";
-
-$active_clients->execute;
-print <<EOF;
-graph_title Clients seen the last hour
-graph_vlabel count
-graph_scale no
-EOF
-while (my $ref = $active_clients->fetchrow_hashref) {
- print "clients_".$ref->{'family'}.".label v".$ref->{'family'}." clients\n";
- print "clients_".$ref->{'family'}.".value ".$ref->{'count'}."\n";
-}
-$active_clients->finish;
-$dbh->disconnect();
-exit 0