sar and iostat recommended interval/count values.

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers sar and iostat recommended interval/count values.
# 1  
Old 06-03-2008
sar and iostat recommended interval/count values.


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?

Any advice is appreciated.

Thanks in advance.
# 2  
Old 06-03-2008
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.
# 3  
Old 06-03-2008
Thanks, I've not used nmon before, but I'll try it out.
# 4  
Old 06-03-2008
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.
vmstat -I -t 1 | tee vmstat.out

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.
# 5  
Old 06-03-2008
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.

Thanks again for your input.
# 6  
Old 06-03-2008
Ah, sorry, was the parameters for vmstat on AIX. Have to put my blinders away sometimes Smilie
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.
# 7  
Old 06-03-2008
Ah.. thanks a lot for the advice! Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Split a content in a file with specific interval base on the delimited values using UNIX command

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)
Discussion started by: KK230689
3 Replies

2. Shell Programming and Scripting

What is the relation between values from TOP and SAR commands?

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)
Discussion started by: mohtashims
1 Replies

3. Shell Programming and Scripting

Create range of values and count values.

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)
Discussion started by: jiam912
10 Replies

4. Solaris

Asvc_t values in iostat output

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)
Discussion started by: saraperu
2 Replies

5. SCO

How to measure disk IO 5.0.7? (sar, return values ​​are not valid)

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)
Discussion started by: flako
0 Replies

6. Shell Programming and Scripting

Count occurences based on interval

Hi, I have a file which has 4500 entries 10000 9880 9800 8700 8200 ... ..... ... ... ... ... ... ... ... 50 (1 Reply)
Discussion started by: Diya123
1 Replies

7. Red Hat

sar error - please give a smaller interval value

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)
Discussion started by: amiteshunique
2 Replies

8. Shell Programming and Scripting

interval based count

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)
Discussion started by: Diya123
0 Replies

9. Shell Programming and Scripting

How to shift values in new column after certain interval?

Hello everyone, my data is in a format as below a a a a a a a a a a a a a a a (8 Replies)
Discussion started by: jojo123
8 Replies

10. Shell Programming and Scripting

summing up iostat values in AIX

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)
Discussion started by: achak01
1 Replies
Login or Register to Ask a Question

Featured Tech Videos