Show
Ignore:
Timestamp:
12/15/10 17:35:19 (2 years ago)
Author:
soma
Message:

modules/freifunk: Make status page update dynamically with javascript and small cosmetic changes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/libs/sys/luasrc/sys.lua

    r6566 r6650  
    167167-- @return  String containing the memory used for buffering in kB 
    168168-- @return  String containing the free memory amount in kB 
     169-- @return  String containing the cpu bogomips (number) 
    169170function sysinfo() 
    170171    local cpuinfo = fs.readfile("/proc/cpuinfo") 
     
    177178    local memfree = tonumber(meminfo:match("MemFree:%s*(%d+)")) 
    178179    local membuffers = tonumber(meminfo:match("Buffers:%s*(%d+)")) 
     180    local bogomips = tonumber(cpuinfo:match("BogoMIPS.-:%s*([^\n]+)")) 
    179181 
    180182    if not system then 
     
    188190    end 
    189191 
    190     return system, model, memtotal, memcached, membuffers, memfree 
     192    return system, model, memtotal, memcached, membuffers, memfree, bogomips 
    191193end 
    192194