git://git.onelab.eu
/
util-vserver-pl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c957a2
)
Optimization in case the context is already running.
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Fri, 27 Jun 2008 15:58:54 +0000
(15:58 +0000)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Fri, 27 Jun 2008 15:58:54 +0000
(15:58 +0000)
python/vserver.py
patch
|
blob
|
history
diff --git
a/python/vserver.py
b/python/vserver.py
index
e638149
..
7652b78
100644
(file)
--- a/
python/vserver.py
+++ b/
python/vserver.py
@@
-459,6
+459,13
@@
class VServer:
pass
def init_disk_info(self):
+ try:
+ dlimit = vserver.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,