Thanks Karl. Unfortunately that didn't work either. Here is an example of my actual data:
02222013083723,ServerA,586950936,1709,20817,3.510409
02222013083723,ServerB,659800656,1702,20920,8.715981
02222013083724,ServerC,873737176,1745,21133,5.4260693
02222013083724,ServerD,1043938832,1716,20898,4.24047
02222013083745,ServerA,623933280,1682,20817,5.815545
02222013083745,ServerB,692769240,1674,20922,6.93751
02222013083745,ServerC,704775144,1704,21133,7.0087843
02222013083746,ServerD,731880448,1706,20898,6.9982367
02222013083806,ServerA,605951920,1609,20817,7.0428286
02222013083807,ServerB,753759440,1599,20937,4.6636114
02222013083807,ServerC,1140883088,1630,21133,5.761619
02222013083807,ServerD,926288920,1614,20899,7.0784245
02222013083828,ServerA,622904272,1601,20817,3.4892871
02222013083828,ServerB,756817136,1591,20937,8.244981
02222013083828,ServerC,1030568704,1622,21133,14.123659
02222013083828,ServerD,1120398200,1601,20902,4.7675056
There is a script that goes out to different servers and grabs some metrics. It then sends the data to a metrics file. In the case above, there are four servers. The last data point (6) is the CPU utilization. My goal is to create one graph with the CPU utilization of all 4 servers on it. A line graph would be perfect here.
This is what I use to plot ServerA CPU:
plot 'test.txt' using 1:(strcol(2) eq "ServerA"? $6:$1/0)
To plot all 4 CPU's, I would use:
plot 'test.txt' using 1:(stringcolumn(2) eq "ServerA"? $6:1/0) title "ServerA" ,\
'test.txt' using 1:(stringcolumn(2) eq "ServerB"? $6:1/0) title "ServerB" ,\
'test.txt' using 1:(stringcolumn(2) eq "ServerC"? $6:1/0) title "ServerC" ,\
'test.txt' using 1:(stringcolumn(2) eq "ServerC"? $6:1/0) title "ServerD"
This would create a graph with an different color of 'X' for each data point. This is difficult to see when you start adding more servers. Being able to draw one line for each server CPU would be great.
Is there any other way to do this? The plot command I used above is basically taken from an older post in a support group to plot filtered data. Maybe with Gnuplot 4.6, there is a different way to do this?
If you want to plot the data above yourself, use these parameters:
set xdata time
set format x "%H:%M"
set timefmt x "%m%d%Y%H%M%S"
set datafile separator ","