in reply to
Calculating percent cpu in linux?
If you really don't want to use ps, I'd look for the definite answer in the source code of a ps/top version that reads from /proc :
http://procps.sourceforge.net/
Please post if you found the answer, because I'm kind of curious too.
Comment on
Re: Calculating percent cpu in linux?
In Section
Seekers of Perl Wisdom