CPU Loading

How can I measure CPU loading (like performance monitor in Windows OS). I use Solaris but I would like to write portable code.
Besides, I have to write programm to load CPU with known percent. How can I use CPU in 30% for example.
Thanks for any ideas.

hi
should we write it together ?
if any progress mail me at
shrikrishna@linux.net
thank you

HI friend plz refer this book to have some info abt it
Developing Linux Application using GTK+ and GDK
"System Monitor" pg number 228
publication: Macmillan Copmuter pub.

BEST LUCK!

Hello, could you give me this book's copy?

friend i am in india so its not possible for me 2 2 send it 2 u
sorry..
:frowning:

I used to think you had got electronic copy :frowning:

helloo again
friend i have hard copy and its not possible 4 me 2 send it by post:D so sorry !

By the way i m online in yahoo mesenger
and my id is

shrikrishna1982@yahoo.com

so that we can chat abt it very welll