OC-MultICE/modules/applications/shutil.lua

20 lines
551 B
Lua
Raw Normal View History

function ps()
local S=""
for k,v in pairs(tT) do
S=S..("pid: "..tostring(k).."\tname: "..tostring(v[1]).."\tenv={")
for l,w in pairs(v[3]) do S=S..(tostring(l).." = "..tostring(w)..", ") end
S=S.."}\n"
end
return S
end
function mem()
return "Total:\t"..tostring(computer.totalMemory()/1024).."K\nFree:\t"..tostring(computer.freeMemory()/1024).."K\nUsed:\t"..tostring((computer.totalMemory()-computer.freeMemory())/1024).."K"
end
function components()
s=""
for t,a in component.list() do
s=s..TS(t).."\t"..TS(a).."\n"
end
return s
end