LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2009, 10:19 AM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 492

Rep: Reputation: 31
Question Modify columns on iostats so all figures line up


As you can see when I add the names the Device column is not big enough to hold all the characters. Is there a way to change the column width of Device or is it hard coded

Code:
Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await  svctm  %util
sda              28.20  1709.60    9.00   49.80     1.21     6.88   281.61     3.80   64.52   3.45  20.28
sda1              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda2              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda3             28.20  1709.60    9.00   49.80     1.21     6.88   281.61     3.80   64.52   3.45  20.28
sdb             248.00  1727.80   66.20  176.00     2.45     7.45    83.69     4.25   17.55   2.78  67.32
sdb1            248.00  1727.80   66.20  176.00     2.45     7.45    83.69     4.25   17.55   2.78  67.32
sdc             184.00   297.80   57.40  203.60     2.00     1.96    31.07     1.29    5.01   2.02  52.68
sdc1            184.00   297.80   57.40  203.60     2.00     1.96    31.07     1.29    5.01   2.02  52.68
sdd             197.60  1708.80   35.40   56.40     0.91     6.90   174.26     7.89   85.88   5.46  50.08
sdd1            197.60  1708.80   35.40   56.40     0.91     6.90   174.26     7.89   85.88   5.46  50.08
sde             215.20  1699.80   37.80   58.00     0.99     6.88   168.17     6.66   69.52   4.96  47.56
sde1            215.20  1699.80   37.80   58.00     0.99     6.88   168.17     6.66   69.52   4.96  47.56
Surplus-ISOImage     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-Cobbler     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-PersonalHome     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-MyMusic     0.00     0.00    1.60    3.00     0.18     0.01    83.48     0.21   46.61  14.35   6.60
Surplus-CarterFamilyMedia     0.00     0.00    0.00  616.00     0.00     2.41     8.00     2.68    4.35   1.39  85.76
Surplus-OracleInstall     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-ComputerBackup     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-VirtualMachineBK     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-ToBurn     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-MAIN_Dom0     0.00     0.00    1.00   23.00     0.01     0.09     8.13     0.15    6.38   1.07   2.56
Surplus-OracleASM_sda     0.00     0.00  275.00    0.80     1.07     0.00     8.00     6.60   23.92   1.74  47.88
Surplus-OracleASM_sdb     0.00     0.00  232.20    0.60     0.91     0.00     8.00     4.37   18.75   1.79  41.58
Surplus-OracleASM_sdd     0.00     0.00  206.40    0.00     0.81     0.00     8.00     4.37   21.49   1.86  38.48
Surplus-OracleASM_sdc     0.00     0.00  252.00    0.00     0.98     0.00     8.00     3.26   12.94   1.37  34.54
Surplus-ORADATA_Balanced     0.00     0.00    0.00 7025.00     0.00    27.44     8.00  1119.80  159.31   0.04  29.48
Surplus-kvmImages     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-SWAP_Balanced     0.00     0.00    0.00    7.00     0.00     0.03     8.00     0.43   61.51  24.00  16.80
Surplus-vm_stripped     0.00     0.00    2.80   22.80     0.01     0.09     8.19     0.18    7.19   5.59  14.30
fd0               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-ROOT_Balanced     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
Surplus-HOME_Balanced     0.00     0.00    0.20    0.00     0.00     0.00     8.00     0.01   35.00  35.00   0.70
Surplus-ORAHOME_Balanced     0.00     0.00  107.80    1.60     3.60     0.01    67.54     1.35   12.37   2.14  23.36
 
Old 04-10-2009, 11:49 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Try to pipe the output to column:
Code:
iostat | column -t
 
Old 04-10-2009, 01:30 PM   #3
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 492

Original Poster
Rep: Reputation: 31
That works... or well this does:

Code:
while [ 1 -eq 1 ] ; do iostat -d -m -x -N 5 2 | grep -v Linux| column -t; done
seems column waits for the entire pipe to finish before outputting and since I'm running it continues it never returns anything.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i have to modify a line in a file using shell scripts,i dont know how to go about it liunx Linux - General 9 02-16-2009 12:22 PM
shell script/command for converting columns/table onto a single line skuz_ball Programming 9 11-30-2007 03:02 AM
How to modify sets of filenames on cmd line? Kropotkin Linux - Newbie 8 11-20-2004 06:35 AM
IOStats in Linux akuate Linux - General 5 08-16-2004 09:14 AM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration