- ballooninfo = yaml.load(open('/proc/xen/balloon', 'r').read())
- currentallocation = parseUnits(ballooninfo['Current allocation'])
- minimumtarget = parseUnits(ballooninfo['Minimum target'])
-
+ currentallocation = int(open('/sys/devices/system/xen_memory/xen_memory0/info/current_kb', 'r').read())
+# this information seems to have vanished in recent linux - we _want_ min_target_kb, but it doesn't seem to be
+# exposed anymore.
+# minimumtarget = int(open('/sys/devices/system/xen_memory/xen_memory0/target_kb', 'r').read())