From: Avi Kivity <[email protected]>

kvm_stat uses a huge number of files for perf_events, increase resource
limit so we don't fail.

Signed-off-by: Avi Kivity <[email protected]>

diff --git a/kvm/kvm_stat b/kvm/kvm_stat
index a2033fe..f8a1399 100755
--- a/kvm/kvm_stat
+++ b/kvm/kvm_stat
@@ -223,6 +223,9 @@ class TracepointProvider(object):
         self.cpus = [int(re.match(cpure, x).group(1))
                      for x in os.listdir('/sys/devices/system/cpu')
                      if re.match(cpure, x)]
+        import resource
+        nfiles = len(self.cpus) * 1000
+        resource.setrlimit(resource.RLIMIT_NOFILE, (nfiles, nfiles))
         fds = []
         self.group_leaders = []
         for cpu in self.cpus:
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to