gluon/package/gluon-announce/files/lib/gluon/announce/statistics.d/processes

4 lines
168 B
Plaintext

local running, total = util.readline(io.open('/proc/loadavg')):match('^[^ ]+ [^ ]+ [^ ]+ (%d+)/(%d+)')
return { running = tonumber(running), total = tonumber(total) }