Commit b46c5262 authored by Dan Gebhardt's avatar Dan Gebhardt
Browse files

First checkin

Queries the ops DB to make sure data is numerous and recent.
parent 7998cae8
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group.
# All rights reserved.
#
# Script to test if data is being entered into the ops db properly.
use strict;
use English;
use Getopt::Std;
use lib '/usr/testbed/lib';
use libtbdb;
use libwanetmondb;
my $numMeas_ok = 100000;
my $lastMeasTime_ok = time() - 60; #last measurement must be within 60 seconds
my $query
= "select unixstamp from pair_data order by idx desc limit $numMeas_ok";
my @results = getRows($query);
if( scalar(@results) < $numMeas_ok ){
print "fail: too few measurements in ops db\n";
die -1;
}
if( $results[0]->{unixstamp} < $lastMeasTime_ok ){
print "fail: last measurement in ops db too old\n";
die -2;
}
print "ok:\n";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment