aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2015-04-04 23:53:59 +0200
committerKristian Lyngstol <kristian@bohemians.org>2015-04-04 23:53:59 +0200
commitde837c61bfff05c368f4d5d73b16e57bf880f739 (patch)
tree38b67edd6f536f01d81ae933ee76918aedb7b21c
parent90097c4c93d5d608d9590bca346ea3ce45967068 (diff)
Port-state bump to get less load
-rwxr-xr-xweb/nms.gathering.org/port-state.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/nms.gathering.org/port-state.pl b/web/nms.gathering.org/port-state.pl
index ad4d7d4..a7b2f05 100755
--- a/web/nms.gathering.org/port-state.pl
+++ b/web/nms.gathering.org/port-state.pl
@@ -18,7 +18,7 @@ my $when =" time > now() - '5m'::interval";
my %json = ();
if (defined($cin)) {
- $when = " time < now() - '$cin'::interval and time > now() - ('$cin'::interval + '25m'::interval) ";
+ $when = " time < now() - '$cin'::interval and time > now() - ('$cin'::interval + '15m'::interval) ";
}
my $query = 'select distinct on (switch,ifname,ifhighspeed,ifhcoutoctets,ifhcinoctets) extract(epoch from date_trunc(\'second\',time)) as time,switch,ifname,max(ifhighspeed) as ifhighspeed,max(ifhcinoctets) as ifhcinoctets,max(ifhcoutoctets) as ifhcoutoctets,switch,sysname from polls natural join switches where ' . $when . ' ';