ia64/xen-unstable

view tools/examples/xc_physinfo.py @ 1372:5a6113c65ead

bitkeeper revision 1.891.1.12 (40a248b0WTGoOa9206iWkyGN0mTPNw)

Allow forcing of IRQ trigger-type to edge or level
(NB. DANGEROUS!).
author kaf24@scramble.cl.cam.ac.uk
date Wed May 12 15:54:24 2004 +0000 (2004-05-12)
parents a39bbe7cddc4
children
line source
1 #!/usr/bin/env python
3 # Get information about the physical host machine
5 import Xc
7 xc = Xc.new()
9 info = xc.physinfo()
11 fmt_info = [ ( 'CPU cores', info['cores']),
12 ('Hyperthreads per core', info['ht_per_core']),
13 ('CPU Speed (MHz)', info['cpu_khz'] / 1000),
14 ('Total physical mem (MB)', info['total_pages'] / 256),
15 ('Free physical mem (MB)', info['free_pages'] / 256) ]
18 for (item, val) in fmt_info:
19 print "%-23s" % item, ':', val