Skip to content
GitLab
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
53fbf79b
Commit
53fbf79b
authored
Mar 23, 2007
by
Robert Ricci
Browse files
A few minor changes:
It's now silent if everything is okay Add a check for too many measurements in the database
parent
4910a7c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
pelab/opsdbcheck.pl
View file @
53fbf79b
...
...
@@ -15,6 +15,7 @@ use libtbdb;
use
libwanetmondb
;
my
$numMeas_ok
=
100000
;
my
$numMeas_too_many
=
5000000
;
my
$lastMeasTime_ok
=
time
()
-
60
;
#last measurement must be within 60 seconds
my
$query
...
...
@@ -25,9 +26,11 @@ if( scalar(@results) < $numMeas_ok ){
print
"
fail: too few measurements in ops db
\n
";
die
-
1
;
}
if
(
scalar
(
@results
)
>
$numMeas_too_many
){
print
"
fail: too many 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
Supports
Markdown
0%
Try again
or
attach a new 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