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
72f9f70c
Commit
72f9f70c
authored
Oct 16, 2018
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor tweaks.
parent
20274928
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
utils/cpuwatch.in
utils/cpuwatch.in
+11
-8
No files found.
utils/cpuwatch.in
View file @
72f9f70c
...
...
@@ -298,7 +298,7 @@ sub getnodeinfo($)
}
$query_result
=
DBQueryWarn
("
select r.pid,r.eid,n.node_id,n.type
,n.eventstate
"
.
DBQueryWarn
("
select r.pid,r.eid,n.node_id,n.type
"
.
"
from nodes as n,reserved as r,node_types as t
"
.
"
where n.node_id=r.node_id and n.role='testnode'
"
.
"
and n.type=t.type and t.class='pc'
"
.
...
...
@@ -347,7 +347,6 @@ sub getnodeinfo($)
$newpcs
{
$pc
}{'
expname
'}
=
$expname
;
$newpcs
{
$pc
}{'
url
'}
=
$url
;
$newpcs
{
$pc
}{'
portalurl
'}
=
$portalurl
;
$newpcs
{
$pc
}{'
state
'}
=
$row
{'
eventstate
'};
$newpcs
{
$pc
}{'
type
'}
=
$row
{'
type
'};
if
(
!
exists
(
$pcs
{
$pc
}))
{
...
...
@@ -459,20 +458,24 @@ sub reportevents($)
my
$warned
=
0
;
foreach
my
$node
(
sort
keys
%pcs
)
{
if
(
!
$ref
->
{
$node
}{'
valid
'}
||
$ref
->
{
$node
}{'
tstamp
'}
==
$pcs
{
$node
}{'
lastcheck
'})
{
my
$lcheck
=
$pcs
{
$node
}{'
lastcheck
'};
if
(
$lcheck
!~
/\d+/
)
{
logit
("
$node
: WARNING: bogus lastcheck '
$lcheck
' ignored
");
}
if
(
!
$ref
->
{
$node
}{'
valid
'}
||
$ref
->
{
$node
}{'
tstamp
'}
==
$lcheck
)
{
my
$now
=
time
();
# no slothd report for an hour, whine
if
(
$
pcs
{
$node
}{'
lastcheck
'}
+
(
60
*
60
)
<=
$now
)
{
if
(
$
lcheck
+
(
60
*
60
)
<=
$now
)
{
logit
("
$node
: WARNING: no slothd report since
"
.
POSIX::
strftime
("
20%y-%m-%d %H:%M:%S
",
$pcs
{
$node
}{'
lastcheck
'}
));
localtime
(
$lcheck
)
));
}
next
;
}
if
(
$ref
->
{
$node
}{'
valid
'})
{
$pcs
{
$node
}{'
lastcheck
'}
=
$ref
->
{
$node
}{'
tstamp
'};
}
my
(
$loadiv
,
$curload
);
if
(
$interval
<
(
5
*
60
))
{
$curload
=
$ref
->
{
$node
}{'
lave1
'};
...
...
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