I want to calculate the cpu percentage for a machine and for the domains in xen.

The code is available libproc-3.2.7.so and in xentop.c file.

Can u tell me how to access this information in my program to calculate cpu percentage ...

also plz tell me abt static and dynamic linking to link to these files............

plz help its urgent ..............

thanx in advance .................