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
ccc691a7
Commit
ccc691a7
authored
Jun 11, 2003
by
Mac Newbold
Browse files
Don't idleswap expts with stale idle data.
parent
960cf669
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/idlemail.in
View file @
ccc691a7
...
...
@@ -191,12 +191,14 @@ EOT
# using two different queries.
$sql
=
<<EOT;
select e.pid,e.eid, idleswap_timeout,
(unix_timestamp(now()) - unix_timestamp(min(last_report))) as staleness,
(unix_timestamp(now()) - unix_timestamp(max(greatest(
last_tty_act,last_net_act,last_cpu_act,last_ext_act))))/60 as idlemin
from reserved as r left join experiments as e on e.pid=r.pid and e.eid=r.eid
left join node_activity as na on r.node_id=na.node_id
where idleswap !=0 and swappable>0 and idle_ignore=0
group by pid,eid having idlemin >= idleswap_timeout order by pid,eid
group by pid,eid having idlemin >= idleswap_timeout and staleness < 600
order by pid,eid
EOT
$q
=
DBQueryFatal
(
$sql
);
if
(
$d
)
{
print
$q
->
as_string
;
$q
->
dataseek
(
0
);
}
...
...
Write
Preview
Supports
Markdown
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