dio: add partition support

This commit is contained in:
Adrian C. (anrxc) 2010-07-10 02:02:34 +02:00
parent d6faae1598
commit 8674c919d6
2 changed files with 3 additions and 2 deletions

3
README
View File

@ -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}

View File

@ -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