Is my approach to performance testing in Linux environment correct?
Analeea last edited by user
I want to do performance testing in linux environment for a C++ application. I need to measure the CPU usage, Memory usage of the application. This application is a multi threaded application.
In this requirement I came across two Tools/Utilities (sar and top). My problem now is if I want to monitor cpu usage by user I can use top utility for this but not sure if this is available in sar utility. If I am wrong on my approach please direct me to the correct path on how to do performance testing in linux environment.
As a end note I use putty to login to the remote linux machine thus any GUI based tool will not help me.
Any help will be of great use to me.
Try taking a look through this site:
A little over half-way down is some 'ps' stuff that is probably helpful. The biggest problem with top is that it's a pain to run and parse as part of a bash script and I'd definitely recommend that you want to hit these commands, parse them, and collect the data over time so you can look for spikes and trends.
sed and awk will be your friends in parsing that data. I'm not sure what your comfort level in linux is, but if you're not familiar with those commands, I'd take a little time to learn them.