I need to dump this information to a file once per 30 seconds:
a) User Space %
b) Kernel %
c) IO Wait %
d) Rx packets/sec Read req/sec
e) Tx packets/sec Write req/sec
f) Rx bytes/sec Read blocks/sec
g) TX bytes/sec Write blocks/sec
In Windows you need to get this via a WMI call.
In XenServer you need to get this from xentop / xenmon.
I'll entertain other ways to do this but you need to discuss them before implementing the work, not afterwards ;)
Xentop / xenmon should be run in batch mode or similar, don't reload the executable every 30 seconds. Same on Windows or you'll interfere with the results (do it in vb.net? its about 5 lines..)
Let me know if you have any questions, I can do this myself but I don't have the time.