target-mips: move FP FMT comments closer to the definitions
[qemu.git] / QMP / vm-info
blobb150d8240cd4824ce0d105c4f22c2e9473f57b38
1 #!/usr/bin/python
3 # Print Virtual Machine information
5 # Usage:
7 # Start QEMU with:
9 # $ qemu [...] -monitor control,unix:./qmp,server
11 # Run vm-info:
13 # $ vm-info ./qmp
15 # Luiz Capitulino <lcapitulino@redhat.com>
17 import qmp
18 from sys import argv,exit
20 def main():
21 if len(argv) != 2:
22 print 'vm-info <unix-socket>'
23 exit(1)
25 qemu = qmp.QEMUMonitorProtocol(argv[1])
26 qemu.connect()
28 for cmd in [ 'version', 'hpet', 'kvm', 'status', 'uuid', 'balloon' ]:
29 print cmd + ': ' + str(qemu.send('query-' + cmd))
31 if __name__ == '__main__':
32 main()