From 3d794abec4531bd2a2e44e2cb0e2ce13c657dcdb Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 18 Jul 2008 21:33:25 +0000 Subject: modules/admin-mini: Several tweaks, initial status page --- libs/core/luasrc/sys.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libs/core') diff --git a/libs/core/luasrc/sys.lua b/libs/core/luasrc/sys.lua index d0195c5da..9f25b84b3 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 -- cgit v1.2.3