Commit ccc691a7 authored by Mac Newbold's avatar Mac Newbold
Browse files

Don't idleswap expts with stale idle data.

parent 960cf669
......@@ -191,12 +191,14 @@ EOT
# using two different queries.
$sql = <<EOT;
select,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 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
$q = DBQueryFatal($sql);
if ($d) { print $q->as_string; $q->dataseek(0); }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment