dotplan

troubleshooting & performance analysis

Munge columnar into one datafile (for processing in a spreadsheet, gnuplot or whatever)

Tags: ,

Often we’ll use awk or cut to spit out a single column of data from a bunch of different files, or maybe from the same file… anyhow once we have these files with one column of data, sometimes we’ll want to splice those files together so we can look at each line (typically a stat of some sort) next to each other. Also it’s very convenient if we want to import the data into a spreadsheet.

Anyhow, let’s say I have three files iscsi_080626.txt greads.out.txt idle.out.txt. I can put them together into one file using the ‘pr’ command like so.

iscsi file

bash-3.00$ head iscsi_080626.txt 32782319.8632793022.9332734064.2332719233.7432652552.7532815570.70

gread file
bash-3.00$ head greads.out.txt

0.000.000.000.000.000.000.000.000.000.00

idle file

bash-3.00$ head idle.out.txt 248.72214217.66291517.19502416.20896915.85643217.06451916.87494817.12295617.19130516.920703

bash-3.00$ pr -m -t iscsi_080626.txt greads.out.txt idle.out.txt > iscsi_greads_idle.txt

And the output file looke like this

bash-3.00$ head iscsi_greads_idle.txt 32782319.86             0.00                    248.72214232793022.93             0.00                    17.66291532734064.23             0.00                    17.19502432719233.74             0.00                    16.20896932652552.75             0.00                    15.85643232815570.70             0.00                    17.06451932801494.63             0.00                    16.87494832696942.10             0.00                    17.12295632715608.64             0.00                    17.19130532835538.38             0.00                    16.920703

Tags: ,

Comments are closed.

© 2009 dotplan. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.