check for kqemu
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Wed, 10 Feb 2010 16:05:25 +0000 (16:05 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Wed, 10 Feb 2010 16:05:25 +0000 (16:05 +0000)
scripts/manage-infrastructure.py

index d859270..2138cae 100755 (executable)
@@ -170,6 +170,13 @@ class BuildBoxes:
         if not self.options.probe:
             self.reboot(box)
         else:
+            command=['ssh',self.root(box),'lsmod']
+            modules=self.backquote(command).split('\n')
+            kqemu_msg='*NO kqemu MODULE LOADED*'
+            for module in modules:
+                if module.find('kqemu')==0:
+                    kqemu_msg='kqemu OK'
+            
             command=['ssh',self.root(box),'pgrep','qemu']
             if self.options.dry_run:
                 self.run(command,None)
@@ -178,7 +185,7 @@ class BuildBoxes:
                 if not pids:
                     self.header ('No qemu process on %s'%box)
                 else:
-                    self.header ("Active qemu processes on %s"%box)
+                    self.header ("Active qemu processes on %s (%s)"%(box,kqemu_msg))
                     command=['ssh',self.root(box),'ps','-o','pid,command'] + [ pid for pid in pids.split("\n") if pid]
                     ps_lines = self.backquote (command).split("\n")
                     for ps_line in ps_lines: