Coding style changes in entropy, load, thermal, uptime.
This commit is contained in:
parent
09fda0ab05
commit
3fe67d4311
|
@ -25,7 +25,7 @@ function worker(format, poolsize)
|
|||
|
||||
-- Get available entropy
|
||||
local f = io.open("/proc/sys/kernel/random/entropy_avail")
|
||||
local ent_avail = f:read()
|
||||
local ent_avail = f:read("*line")
|
||||
f:close()
|
||||
|
||||
-- Calculate percentage
|
||||
|
|
2
load.lua
2
load.lua
|
@ -17,7 +17,7 @@ module("vicious.load")
|
|||
function worker(format)
|
||||
-- Get load averages
|
||||
local f = io.open('/proc/loadavg')
|
||||
local line = f:read()
|
||||
local line = f:read("*line")
|
||||
f:close()
|
||||
|
||||
-- Get load data
|
||||
|
|
|
@ -17,7 +17,7 @@ module("vicious.thermal")
|
|||
function worker(format, thermal_zone)
|
||||
-- Get thermal zone
|
||||
local f = io.open("/proc/acpi/thermal_zone/" .. thermal_zone .. "/temperature")
|
||||
local line = f:read()
|
||||
local line = f:read("*line")
|
||||
f:close()
|
||||
|
||||
-- Get temperature data
|
||||
|
|
|
@ -20,7 +20,7 @@ module("vicious.uptime")
|
|||
function worker(format, padding)
|
||||
-- Get /proc/uptime
|
||||
local f = io.open("/proc/uptime")
|
||||
local line = f:read()
|
||||
local line = f:read("*line")
|
||||
f:close()
|
||||
|
||||
-- Format data
|
||||
|
|
Loading…
Reference in New Issue