Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
fec352d0
Commit
fec352d0
authored
Jan 29, 2014
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some changes to hopefully avoid false positives.
parent
6e22a5f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
utils/poolmonitor.in
utils/poolmonitor.in
+18
-9
No files found.
utils/poolmonitor.in
View file @
fec352d0
#!/usr/bin/perl -w
#
# Copyright (c) 2008-201
3
University of Utah and the Flux Group.
# Copyright (c) 2008-201
4
University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
...
...
@@ -59,6 +59,7 @@ my $SLEEP_INTERVAL= 300;
# Lets not warn more then once a day.
my
%warned
=
();
my
%noanswer
=
();
my
$lastmail
=
time
();
# un-taint path
...
...
@@ -153,19 +154,27 @@ while (1) {
while
(
my
(
$node_id
)
=
$query_result
->
fetchrow_array
())
{
print
"
Checking to see if
$node_id
is reactive ...
\n
";
my
$status
=
SSHwithTimeout
(
$node_id
,
"
ls / > /dev/null
",
45
,
$debug
);
my
$status
=
SSHwithTimeout
(
$node_id
,
"
ls / > /dev/null
",
60
,
$debug
);
if
(
$status
)
{
print
"
-->
$node_id
is down for the count!
\n
";
if
(
!
exists
(
$warned
{
$node_id
}))
{
SENDMAIL
(
$TBOPS
,
"
Shared node
$node_id
is unresponsive
",
"
Shared node
$node_id
is unresponsive
",
$TBOPS
);
$warned
{
$node_id
}
=
time
();
if
(
!
exists
(
$noanswer
{
$node_id
}))
{
print
"
-->
$node_id
is not answering!
\n
";
$noanswer
{
$node_id
}
=
time
();
}
else
{
print
"
-->
$node_id
is down for the count!
\n
";
if
(
!
exists
(
$warned
{
$node_id
}))
{
SENDMAIL
(
$TBOPS
,
"
Shared node
$node_id
is unresponsive
",
"
Shared node
$node_id
is unresponsive
",
$TBOPS
);
$warned
{
$node_id
}
=
time
();
}
}
}
else
{
print
"
-->
$node_id
appears to be alive and kicking!
\n
";
delete
(
$noanswer
{
$node_id
})
if
(
exists
(
$noanswer
{
$node_id
}));
delete
(
$warned
{
$node_id
})
if
(
exists
(
$warned
{
$node_id
}));
}
...
...
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