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

Add ExpSwapper func, to find out who swapped it.

parent 444c2568
......@@ -121,7 +121,7 @@ use Exporter;
TBValidNodeLogType TBValidNodeName TBSetNodeLogEntry
TBSetSchedReload MapNodeOSID TBLockExp TBUnLockExp TBSetExpSwapTime
TBUnixGroupList TBOSID TBOSMaxConcurrent TBOSCountInstances
TBOSLoadMaxOkay TBImageLoadMaxOkay TBImageID
TBOSLoadMaxOkay TBImageLoadMaxOkay TBImageID ExpSwapper
TBdbfork VnameToNodeid TBExpLocked
TBIsNodeRemote TBExptSetLogFile TBExptClearLogFile TBExptGetLogFile
TBIsNodeVirtual TBControlNetIP TBPhysNodeID
......@@ -999,6 +999,29 @@ sub ExpLeader($$)
return $row[0];
# Return Experiment swapper. First argument pid. Second argument is eid.
# usage: ExpSwapper(char *pid, char *eid)
# returns char *swapper if a valid pid/eid.
# returns 0 if an invalid pid/eid.
sub ExpSwapper($$)
my($pid, $eid) = @_;
my $query_result =
DBQueryFatal("select expt_swap_uid from experiments ".
"where eid='$eid' and pid='$pid'");
if ($query_result->numrows == 0) {
return 0;
my @row = $query_result->fetchrow_array();
return $row[0];
# Return a list of leaders (proj/group roots) for a given pid/gid,
# in the format of an email address list. If no gid, assumes gid=pid.
Markdown is supported
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