diff --git a/contrib/README.md b/contrib/README.md index ce0bbf5..5c5d1a7 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -60,11 +60,15 @@ Supported platforms: Linux (required tools: `sysfs`) **vicious.contrib.countfiles** -vicious.contrib.dio - - provides I/O statistics for requested storage devices +**vicious.contrib.dio** + +Provides I/O statistics for requested storage devices + +- Arguments: - takes the disk as an argument, i.e. "sda" (or a specific partition, i.e. "sda/sda2") - - returns a table with string keys: {total_s}, {total_kb}, {total_mb}, +- 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/contrib/dio.lua b/contrib/dio_linux.lua similarity index 95% rename from contrib/dio.lua rename to contrib/dio_linux.lua index 5639bc8..3059361 100644 --- a/contrib/dio.lua +++ b/contrib/dio_linux.lua @@ -14,7 +14,7 @@ local helpers = require("vicious.helpers") -- Disk I/O: provides I/O statistics for requested storage devices -- vicious.contrib.dio -local dio = {} +local dio_linux = {} -- Initialize function tables @@ -70,4 +70,4 @@ local function worker(format, disk) end -- }}} -return setmetatable(dio, { __call = function(_, ...) return worker(...) end }) +return setmetatable(dio_linux, { __call = function(_, ...) return worker(...) end })