summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-07-18 21:33:25 +0000
committerSteven Barth <steven@midlink.org>2008-07-18 21:33:25 +0000
commit3d794abec4531bd2a2e44e2cb0e2ce13c657dcdb (patch)
treec2d48d05a9c1db6563a48540696b0dce414ba17b /libs
parent90c98540b15d2f780fc30223e6ff32399a78a130 (diff)
modules/admin-mini: Several tweaks, initial status page
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