Skip to content
Snippets Groups Projects
Commit 58151789 authored by Steven Murray's avatar Steven Murray
Browse files

Added subdir to stagerrm log of cta-fst-gcd

parent 2ef9106b
Branches
Tags
No related merge requests found
...@@ -188,7 +188,7 @@ class Gc: ...@@ -188,7 +188,7 @@ class Gc:
return result return result
def eosstagerrm(self, fxid, freebytes): def eosstagerrm(self, fxid, subdir, freebytes):
logger = logging.getLogger('gc') logger = logging.getLogger('gc')
mgmurl = "root://{}".format(self.mgmhost) mgmurl = "root://{}".format(self.mgmhost)
cmd = "eos {} stagerrm fxid:{}".format(mgmurl, fxid) cmd = "eos {} stagerrm fxid:{}".format(mgmurl, fxid)
...@@ -197,7 +197,7 @@ class Gc: ...@@ -197,7 +197,7 @@ class Gc:
process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
stdout,stderr = process.communicate() stdout,stderr = process.communicate()
if 0 == process.returncode: if 0 == process.returncode:
logger.info("minfreebytes={} freebytesbefore={} executed='{}'".format(self.minfreebytes, freebytes, cmd)) logger.info("minfreebytes={} subdir={} freebytesbefore={} executed='{}'".format(self.minfreebytes, subdir, freebytes, cmd))
def processfile(self, subdir, fstfile): def processfile(self, subdir, fstfile):
statvfs = os.statvfs(subdir) statvfs = os.statvfs(subdir)
...@@ -210,7 +210,7 @@ class Gc: ...@@ -210,7 +210,7 @@ class Gc:
now = time.time() now = time.time()
agesecs = now - statinfo.st_ctime agesecs = now - statinfo.st_ctime
if agesecs > self.gcagesecs: if agesecs > self.gcagesecs:
self.eosstagerrm(fstfile, freebytes) self.eosstagerrm(fstfile, subdir, freebytes)
self.nbfilesconsideredsincelastreport = self.nbfilesconsideredsincelastreport + 1 self.nbfilesconsideredsincelastreport = self.nbfilesconsideredsincelastreport + 1
if self.nbfilesbeforereport == self.nbfilesconsideredsincelastreport: if self.nbfilesbeforereport == self.nbfilesconsideredsincelastreport:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment