From 8674c919d64291827eec05e1e3fbc21c29a7396e Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sat, 10 Jul 2010 02:02:34 +0200 Subject: [PATCH] dio: add partition support --- README | 3 ++- widgets/dio.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index 106bd46..5f07bc5 100644 --- a/README +++ b/README @@ -167,7 +167,8 @@ vicious.widgets.fs vicious.widgets.dio - provides I/O statistics for requested storage devices - - takes the disk as an argument, i.e. "sda" + - takes the disk as an argument, i.e. "sda" (or specific partition, + i.e. "sda/sda5") - returns a table with string keys: {total_s}, {total_kb}, {total_mb}, {read_s}, {read_kb}, {read_mb}, {write_s}, {write_kb}, {write_mb} and {sched} diff --git a/widgets/dio.lua b/widgets/dio.lua index 4aa7002..edf4638 100644 --- a/widgets/dio.lua +++ b/widgets/dio.lua @@ -61,7 +61,7 @@ local function worker(format, disk) helpers.uformat(disk_usage[disk], "total", diff_total[disk][7] + diff_total[disk][3], unit) -- Store I/O scheduler - if disk_stats.queue.scheduler then + if disk_stats.queue and disk_stats.queue.scheduler then disk_usage[disk]["{sched}"] = string.gmatch(disk_stats.queue.scheduler, "%[([%a]+)%]") end