|
From: mbm329 <mb...@gm...> - 2010-11-22 21:30:22
|
Hello,
I'm trying to plot read and write requests from a storage array. I
have an application that dumps data with each array controller's read
and write requests on a separate line. I'd rather not mangle the data
from the original application's dump if possible. Within gnuplot, I'm
trying to conditionally say, "If the 4th column is <predetermined
name>, then plot the sum of columns 2 and 3." It's not working out
for me, so far. Instead of three lines, I get a single line with
multiple points on the same y axis. Below is my config and data file.
Is this even possible with gnuplot? Any help is certainly
appreciated.
Thanks,
Mike
############################
A sample of the gnuplot config that is not working properly:
set title "Array I/O"
set terminal png size 1024,768
set output "/var/www/html/eva.png"
set key below reverse height 1 width -1 box
set grid x y
set datafile separator ","
set multiplot
set origin 0.0,0.0
set size 1.0,1.0
set xlabel "Time (MM/DD:HH:MM:SS)"
set xdata time
set xtics rotate by -70
set timefmt "%d/%b/%Y %H:%M:%S"
set format x "%m/%d:%H:%M:%S"
set xrange [ "5/Nov/2010 00:56:29" : "5/Nov/2010 00:57:25" ]
set ylabel "Req/sec"
set format y "%10.0f"
set yrange [ 0 : 5000 ]
plot\
'./eva.dat1' using 1:(stringcolumn(4) == "5000-1FE1-5000-BDDC" ?
($2+$3) : NaN) with linespoints title "ARRAY01/B/1",\
'./eva.dat1' using 1:(stringcolumn(4) == "5000-1FE1-5000-BDDD" ?
($2+$3) : NaN) with linespoints title "ARRAY01/B/2",\
'./eva.dat1' using 1:(stringcolumn(4) == "5000-1FE1-5000-BDDE" ?
($2+$3) : NaN) with linespoints title "ARRAY01/B/3"
set nomultiplot
############################
A sample of the data file:
5/Nov/2010 00:56:30,3043,71,5000-1FE1-5000-BDDC
5/Nov/2010 00:56:30,1043,71,5000-1FE1-5000-BDDD
5/Nov/2010 00:56:30,2023,71,5000-1FE1-5000-BDDE
5/Nov/2010 00:56:34,3371,61,5000-1FE1-5000-BDDC
5/Nov/2010 00:56:34,3173,60,5000-1FE1-5000-BDDD
5/Nov/2010 00:56:34,1139,42,5000-1FE1-5000-BDDE
5/Nov/2010 00:56:44,2905,110,5000-1FE1-5000-BDDC
5/Nov/2010 00:56:44,3074,88,5000-1FE1-5000-BDDD
5/Nov/2010 00:56:44,1352,76,5000-1FE1-5000-BDDE
5/Nov/2010 00:56:54,3355,58,5000-1FE1-5000-BDDC
5/Nov/2010 00:56:54,2932,170,5000-1FE1-5000-BDDD
5/Nov/2010 00:56:54,2015,38,5000-1FE1-5000-BDDE
5/Nov/2010 00:57:04,3115,120,5000-1FE1-5000-BDDC
5/Nov/2010 00:57:04,3197,85,5000-1FE1-5000-BDDD
5/Nov/2010 00:57:04,2546,92,5000-1FE1-5000-BDDE
5/Nov/2010 00:57:14,1163,121,5000-1FE1-5000-BDDC
5/Nov/2010 00:57:14,1408,51,5000-1FE1-5000-BDDD
5/Nov/2010 00:57:14,3521,33,5000-1FE1-5000-BDDE
5/Nov/2010 00:57:24,1412,58,5000-1FE1-5000-BDDC
5/Nov/2010 00:57:24,2612,85,5000-1FE1-5000-BDDD
5/Nov/2010 00:57:24,1589,52,5000-1FE1-5000-BDDE
|