[Ilugc] How to measure the CPU Usage in linux
sbharathi at MidasComm.Com
Wed Nov 11 11:36:36 IST 2009
On 10:47am, Suresh Kumar wrote:
No single ans to this Qs.
> 1) CPU Usage of this application
Try time command.
> 2) Memory Usage of this application
VSZ in ps or /proc/$PID/status
> 3) Any memory leakage (measure the free memory before start the
> application, measure the free memory after the application ends -
> both values should be equal)
> 4)CPU check --- (Measure the CPU utilization before start the app,
> measure the CPU usage after the application ends .....----- both
> values should be equal)
It is not the right way. Many processes are running in the system, so
time to time usage may very in small amount and the memory used by the
application may not recollected imdly at the end of execution.
If the application is running for very short time, it is hard to see
the effect of memory leakage. So you should try memory debuggers like
valgrind to analysis the code.
More information about the ilugc