11 lines
239 B
Lua
Executable File
11 lines
239 B
Lua
Executable File
local file = io.popen("grep -c processor /proc/cpuinfo")
|
|
local numcpus = file:read("*n")
|
|
file:close()
|
|
listcpus = ""
|
|
for i = 1,numcpus
|
|
do listcpus = listcpus.."${cpu cpu"..tostring(i).."} "
|
|
end
|
|
|
|
function conky_mycpus()
|
|
return listcpus
|
|
end |