Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
b46c5262
Commit
b46c5262
authored
Mar 21, 2007
by
Dan Gebhardt
Browse files
First checkin
Queries the ops DB to make sure data is numerous and recent.
parent
7998cae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
pelab/opsdbcheck.pl
0 → 100644
View file @
b46c5262
#!/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
";
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment