X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=python%2Fvserver.py;h=d7d208e4581c55f8f37ddafd105c5f203cd232e1;hb=60e9563ddfd20f82a6a57ad49b9d1e6c188fb57e;hp=e638149f9f6d9a227042f44d2108328f27230460;hpb=6d0cf1f215994c864ff932bf5507b5147d9d1ffc;p=util-vserver-pl.git diff --git a/python/vserver.py b/python/vserver.py index e638149..d7d208e 100644 --- a/python/vserver.py +++ b/python/vserver.py @@ -459,6 +459,13 @@ class VServer: pass def init_disk_info(self): + try: + dlimit = vserverimpl.getdlimit(self.dir, self.ctx) + self.disk_blocks = dlimit[0] + self.disk_inodes = dlimit[2] + return self.disk_blocks * 1024 + except Exception, e: + pass cmd = "/usr/sbin/vdu --script --space --inodes --blocksize 1024 --xid %d %s" % (self.ctx, self.dir) p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,