Hi All,
I am trying to run sar on a Redhat server during a test I am performing for a couple of hours. I would like to get the sar metrics for every second (instead of the regularly set up 10 minute interval in the cron). What is the most efficient way to do this?
What are you trying to do? It's impossible to say what's "most efficient" without knowing what your goals are.
In general, I'd recommend testing sar on your hardware to ensure it can sample that fast. If it takes more than one second to collect a sample, you'd probably be better off sampling ever 2 or even 5 seconds.
If you do need to sample that often, read the man page(s) and other documentation and see if you can limit what is being sampled.
Yes, I am thinking 1 second might be too much for sar, I will go with 30 seconds or even a minute. What I want is a sar data file created for a period of couple of hours while I perform some tests instead of the 10 minute gap the cron job currently is set up for.
If your process runs for a couple of hours, then the sample interval should reflect this, else you will end up with too much details to make a good judgement from.
If you ask it to sample at 30 seconds for 120 repetitions, you will get an hour's data. I suppose you can graph (with Excel or similar) the data:-
You will need to consider what options to set for whatever you want to measure.
If you bring the sampling down to a single second, or even two seconds then there is a risk that the sar processing will skew your results, a bit like putting a thermometer in a mug of hot coffee will actually cool it a little and tell you what the temperature has now become, not what it was.
To get all the sar data for 2 hours at 30 minute interval and a place graph look on the web for a plae to graph it. I can't post URLs, because I'm a newbie here.
Hi,
I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
I am running below script to display last 48 hour data but the output is not displaying heading -
AIX eqrdb26u1 1 6 00CFD5E34C00 01/21/10
System configuration: lcpu=8 ent=2.00 mode=Uncapped
22:31:40 %usr %sys %wio %idle physc %entc
and footer -
Average 25 9 ... (1 Reply)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
We have a script that uses
sar -u 1 10 | awk '/Average/ { print ( $2 + $3 ) }'
to get the CPU usage of a mutli engine machine. We think we are getting wrong information from the above string. We think it is adding up the total of the 12 engines and reporting back the total not the overall... (5 Replies)