Hello,
There are some ways to do this.
For CPU monitoring (and network), you can look into a package called mrtg that can be setup to monitor CPU processes, and graph it out. It will require you to setup snmpd and other things in order to get it to function properly.
For code, and how much CPU you use, check out your compiler to see if it supports profiling. I did that for COBOL code on a VAX/VMS, and for C++ on my Macintosh. Found out what functions used the most CPU time, and how long it took to do them. I liked profiling sorts, and comparing quicksort vs. bubble sort and the like.
Now, I know it isn't cross-platform, but the profiling might be the most efficient and non-skewing of the techniques. Why? because it is built into the compiler environment, and I am sure that the program coders took that into account.
Christian
kc0arf
Posting Virtuoso
1,937 posts since Mar 2004
Reputation Points: 121
Solved Threads: 57
Stop posting in this thread o.0 its 4 years old.
William Hemsworth
Posting Virtuoso
1,591 posts since Mar 2008
Reputation Points: 1,429
Solved Threads: 129