diff options
author | Steven Barth <steven@midlink.org> | 2008-07-18 21:33:25 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-07-18 21:33:25 +0000 |
commit | 3d794abec4531bd2a2e44e2cb0e2ce13c657dcdb (patch) | |
tree | c2d48d05a9c1db6563a48540696b0dce414ba17b /libs | |
parent | 90c98540b15d2f780fc30223e6ff32399a78a130 (diff) |
modules/admin-mini: Several tweaks, initial status page
Diffstat (limited to 'libs')
-rw-r--r-- | libs/core/luasrc/sys.lua | 7 |
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 |