I got a request from a client to check on their server's cpu, memory and disk utilization. Am planning to use the sar and iostat commands to achieve this. The server is used for sending and receiving messages between the stockbrokers, so I was thinking to run the commands during the market peak period, as this is when loads of messages will be forwarded to the server. This 'market peak' period will last about 10 - 15 minutes.
Question is:
What is the recommended interval/count values should I set for both sar and iostat in order to get a good peak/average utilization result?
You would be better using NMON which will create a CSV file which can then be used with NMON analyser to produce an EXCEL spreedsheet file with pictures showing all machine activity. Much easier to use than SAR and IOSTAT and pictures are better evidence to support troubled systems.
If you are going for plain text you should log some time before the peak times and after it. Having 5 sec intervals should be ok. I usually just collect in 1 second intervals (depends on how much resources you are looking at - ie. an iostat with a lot of disks will produce a lot of logs).
Though, as johnf said, if you have to present this to other people, that will see nothing in plain text, it's better to use nmon for example.
If you go for plain text, you might think about vmstat to get a 1st impression what is going on.
The parameters include a timestamp and keep some columns out nobody needs anymore. The 1 is an interval of 1 second and it is piped into "tee", so it will write it to the file and print it on the console too.
Thanks zaxxon. Guess it'll be fine if I were to run it with 5 sec intervals for about a minute before and during the peak time? That'll be 12 counts altogether in a run.
The vmstat flags aren't valid (am running on Ubuntu). Prolly I hafta use a script to append the timestamp in the result.
Ah, sorry, was the parameters for vmstat on AIX. Have to put my blinders away sometimes
Yep, 5 secs is ok. Let it run some mins before your peak starts and some mins after it so you can see and show others the difference.
But as johnf said, nmon is really good, especially with the easy output in graphs.
Hi All,
we have a requirement to split a content in a text file every 5 rows and write in a new file .
conditions:
if 5th line falls between center of the statement . it should look upto after ";"
files are below format:
1 UPDATE TABLE TEST1 SET VALUE ='AFDASDFAS'
2 WHERE... (3 Replies)
Hi,
Please have a look at the look at the below top and sar commands.
top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}'
CPU Load: 0.52
sar -u 1 1
Linux 3.10.0-514.16.1.el7.x86_64 (mymac) 06/01/2017 _x86_64_ (2 CPU)
03:27:40 PM CPU %user %nice ... (1 Reply)
Gents,
It is possible to generate a range of values according to column 1 and count the total of rows in the range.
example
input
15.3
15.5
15.8
15.9
16.0
16.1
16.8
17.0
17.5
18.0
output desired
15.0 - 15.9 = 4 (10 Replies)
Noticed that asvc_t values in iostat command outputs are mostly more than 100 in our previous iostat analysis.
Also found the following detail from an alternate site IO Bottleneck - Disk performance issue - UnixArena
----
1. asvc_t average service time of active transactions, in... (2 Replies)
Hello
I am analyzing disk performance OSR5.0.7 running inside VirtualBox.
GUEST: osr5.0.7; 1GB ram; raw disk
HOST: SLES11SP3, 4GB ram; 1 disc SATA2-7200rpm
But I'm not sure how to do it right (the values returned by sar not match the values of the physical machine)
The attributes... (0 Replies)
Hiii All....
I am stuck at a monitoring issue, and need your help urgently.
I am trying to run
# sar 1 1
but I am getting error messages like:
"Please give a smaller interval value"
:confused: :wall:
I am using RHEL 5.7 and sysstat-9.x, on zVM.
I tried to erase and... (2 Replies)
Hi,
I have a file with 4 million rows. what i am trying to achieve is for every 1000 interval count the number of rows and display it
i/p
12
200
400
750
1000
1500
1800
2200
2345
2600
2896
3020
3400 (0 Replies)
Friends,
I have to run iostat -d on my AIX machine and print the sum of the output in tps column per iteration. can any one pls guide me how to do this using awk. here is the sample output
iostat -d 2 2 | awk '!/System/ && !/Disks/ && !/cd/ && !/^$/ {print $4}'
2.0
3.0
1.0
3.0... (1 Reply)