From 31ebd0e37820c3a890a69dead01edecd5d91ad9d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 14 Feb 2011 15:36:04 +0000 Subject: [PATCH] libs/sys: better handle bogomips parsing --- libs/sys/luasrc/sys.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index 2819c338e..2bdc15ecb 100644 --- a/libs/sys/luasrc/sys.lua +++ b/libs/sys/luasrc/sys.lua @@ -175,7 +175,7 @@ function sysinfo() local memcached = tonumber(meminfo:match("\nCached:%s*(%d+)")) local memfree = tonumber(meminfo:match("MemFree:%s*(%d+)")) local membuffers = tonumber(meminfo:match("Buffers:%s*(%d+)")) - local bogomips = tonumber(cpuinfo:match("BogoMIPS.-:%s*([^\n]+)")) + local bogomips = tonumber(cpuinfo:match("[Bb]ogo[Mm][Ii][Pp][Ss].-: ([^\n]+)")) or 0 local system = cpuinfo:match("system type\t+: ([^\n]+)") or -- 2.25.1