I just started using R, so please be lentient...
Currently I am trying to visualize some disk preformance data gathered by SAR on a Linux server. The header of the CSV data looks like this:
timestamp; DEV; tps; rd_sec/s; wr_sec/s; avgrq-sz; avgqu-sz; await, svctm; %util
DEV represents the device name which I use to group the data:
disks <- split(x = dkstbl, f = dsktbl[, "DEV"])
Using RStudio with the manipulate library, I draw the following plot:
manipulate(
plot(disks[disk][[1]]$tps[time],
disks[disk][[1]]$await[time],
xlim = c(0,max(disks[disk][[1]]['tps'])),
ylim = c(0,max(disks[disk][[1]]['await'])),
main = paste(disk,disks[disk][[1]]$X00.00.01[time]),
xlab = 'IOPS',
ylab = 'AWAIT'
),
time = slider(1, 1000),
disk = picker(as.list(names(disks)))
)
That's almost what I want, but still not exactly. What I want should contain the data of all the disks on one plot and probably will look somehow like so:
manipulate(
plot(disks[*][[1]]$tps[time],
disks[*][[1]]$await[time],
xlim = c(0,max(disks[*][[1]]['tps'])),
ylim = c(0,max(disks[*][[1]]['await'])),
main = paste(disks[*][[1]]$X00.00.01[time]),
xlab = 'IOPS',
ylab = 'AWAIT'
),
time = slider(1, 1000)
)
... where the asteriks (*) needs to be replaced with something that works in order to plot all disks at once. How do I achieve that?
Thanks and Cheers,
Daniel