From b2671410bf5468443d6eb49f525d6c3e3fd7e28f Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sat, 31 Oct 2009 17:27:07 +0000 Subject: NIU: Fixes, System --- modules/niu/luasrc/view/niu/system.htm | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 modules/niu/luasrc/view/niu/system.htm (limited to 'modules/niu/luasrc/view') diff --git a/modules/niu/luasrc/view/niu/system.htm b/modules/niu/luasrc/view/niu/system.htm new file mode 100644 index 0000000000..0f955d7bb4 --- /dev/null +++ b/modules/niu/luasrc/view/niu/system.htm @@ -0,0 +1,35 @@ +<% +local dsp = require "luci.dispatcher" +local utl = require "luci.util" +local nxo = require "nixio" +local sinfo = nxo.sysinfo() +local load1 = nxo.bit.div(sinfo.loads[1] * 100, 1) +local days = nxo.bit.div(sinfo.uptime, 86400) +local hour = nxo.bit.div(sinfo.uptime, 3600) % 24 +local mins = nxo.bit.div(sinfo.uptime, 60) % 60 +%> +
Status:
+ + + + + + + + + +
System Load<%=load1%> %
Uptime<%=days%>d, <%=hour%>:<%=mins%>
+
+ \ No newline at end of file -- cgit v1.2.3