summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/core/luasrc/sys.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/core/luasrc/sys.lua b/libs/core/luasrc/sys.lua
index d0195c5daa..9f25b84b30 100644
--- a/libs/core/luasrc/sys.lua
+++ b/libs/core/luasrc/sys.lua
@@ -158,6 +158,13 @@ function uniqueid(bytes)
end
+-- Returns uptime stats
+function uptime()
+ local loadavg = io.lines("/proc/uptime")()
+ return loadavg:match("^(.-) (.-)$")
+end
+
+
group = {}
group.getgroup = posix.getgroup