Is this iostat pipe to sort service request command correct?


 
Thread Tools Search this Thread
Operating Systems Linux SuSE Is this iostat pipe to sort service request command correct?
# 1  
Old 02-25-2014
Is this iostat pipe to sort service request command correct?

Hi,

my os is SLES 10

from sort

iostat

as my output does not include rkB/s and wkB/s I probably have to adjust the key position, so

is the following iostat pipe to sort service request command correct?

Code:
oracle@vmc_stallite:~> iostat -x | sort -nrk11
sda               0.96     9.56    1.72    4.21    93.06   112.05    34.57     0.22   36.95   3.66   2.17
Linux 2.6.16.60-0.85.1-default (vmc_stallite)   02/11/14
Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.50    0.06    1.60    0.93    0.00   94.91

thanks a lot!
# 2  
Old 02-27-2014
This should provide a less confusing output (assuming you want to sort the output by the service time):
Code:
iostat -x | awk '$13 > 0' | sort -nrk13

# 3  
Old 02-27-2014
Code:
iostat -x | awk 'NF>10' | sort -k11r

# 4  
Old 02-28-2014
could you expalin why it is

Code:
iostat -x | awk '$13 > 0' | sort -nrk13

why is it 13 and not 11 since my output only have 11 columns?

thanks
# 5  
Old 02-28-2014
Quote:
Originally Posted by jediwannabe
why is it 13 and not 11 since my output only have 11 columns?
Because I overlook you were using an older Linux release which has 12 columns by the way, it should be 11 indeed in your case.

This is what I got (two extra columns r_await and w_await):
Code:
sda              72,86    34,47  129,62   19,70  3738,62   450,36    56,11     2,53   16,90   11,26   54,04   1,07  15,92
Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util


Last edited by jlliagre; 02-28-2014 at 05:31 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Iostat and top command

I am facing strange behaviour of iostat command and top command. where initially it is showing high utilization and after it is showing low utilization. iostat command avg-cpu: %user %nice %system %iowait %steal %idle 73.60 0.01 23.93 0.92 0.00 1.54 Device: rrqm/s wrqm/s r/s w/s... (3 Replies)
Discussion started by: manoj.solaris
3 Replies

2. Shell Programming and Scripting

awk pipe to sort

In the below awk to add a sort by smallest to largest should it be added after the END? Thank you :). BEGIN { FS="*" } # Read search terms from file1 into 's' FNR==NR { s next } { # Check if $5 matches one of the search terms for(i in s) { if($5 ~ i) { ... (4 Replies)
Discussion started by: cmccabe
4 Replies

3. Shell Programming and Scripting

Not able to sort two fields and printf not displaying the correct values

Not able to sorting two fileds resolved printf issue 01-1000/9|JAN 01-0000/6|MAN 01-1010/2|JAN 01-1010/2|JAN 01-1010/2|JAN 01-1000/9|JAN 01-1000/9|JAN 01-1000/9|SAA 01-1000/9|SAA 01-0000/6|SAN 01-0000/6|SAN 1.sort -t'|' -k1,1n -k2,2 file (3 Replies)
Discussion started by: kalia4u
3 Replies

4. Shell Programming and Scripting

Sort file using pipe

I am trying to create a file (epilepsy70_average.txt) and then pipe that file into a sort and save a new file. The new file is sort.txt but as of know it is blank. I can create the file in one command and then sort it in another. Is the pipe not correct? Thank you :). awk... (2 Replies)
Discussion started by: cmccabe
2 Replies

5. Solaris

run a service via startup script (correct me if I am wrong)

Environment Solaris 9 I have configured the Solaris9 as NTP client in which Solaris9 is syncing the time with a windows2008 R2 Server which is runing fine. Now I want that the xntpd service should start at startup. I did this via a script. Kindly correct if I did any thing wrong: 1.)Made... (9 Replies)
Discussion started by: z_haseeb
9 Replies

6. Solaris

How to use IOSTAT command

Hello everyone, Can you please explain me what kind of information do IOSTAT show ? iostat -xnz 3 show me those informations: The I/O of the c0t0d0 disk is normal ? extended device statistics r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device 0.0 ... (3 Replies)
Discussion started by: adilyos
3 Replies

7. Solaris

iostat command question

Iostat inquiry;# iostat -e ---- errors --- device s/w h/w trn tot fd0 0 0 0 0 md0 0 0 0 0 md1 0 0 0 0 md2 0 0 0 0 md10 0 0 0 0 md11 0 0 0 0 md12 0 0 0 0 md30 0 0 0 0 md31 0 0 0 0 md32 0 0 0 0 md40 0 0 0 0 md41 0 0 0 0 md42 0 0 0 0 md50 0 0 0 0 md51 0 0 0 0 md52 0 0 0 0 md60 0 0 0... (2 Replies)
Discussion started by: pepi
2 Replies

8. Shell Programming and Scripting

Unable to get the correct sort order in perl.

Hi, I have created the hash. %hash; @arr1 = qw(Dealnum AdminStatus adminReason effFrom effTo); @arr2 = qw(121212121 YES 1992-06-19T05:14:27 ); @hash{@arr1}=@arr2; foreach(sort keys %hash){ print "$_ ---- $hash{$_}\n"; } The output i got like this: C:\strawberry\perl\bin>perl... (1 Reply)
Discussion started by: vanitham
1 Replies
Login or Register to Ask a Question