added some nice stuff like ps(*f*) and mem() to shutil
This commit is contained in:
parent
224d2160ac
commit
b390e2764b
@ -9,3 +9,16 @@ function cat(p)
|
|||||||
print(f:read("*a"))
|
print(f:read("*a"))
|
||||||
f:close()
|
f:close()
|
||||||
end
|
end
|
||||||
|
function ps(f)
|
||||||
|
local f=f or ""
|
||||||
|
for k,v in ipairs(os.tasks()) do
|
||||||
|
if v:find(f) then
|
||||||
|
print(tostring(k).."\t"..tostring(v))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function mem()
|
||||||
|
print("Total:\t"..tostring(math.floor(computer.totalMemory()/1024)).."K")
|
||||||
|
print("Free: \t"..tostring(math.floor(computer.freeMemory()/1024)).."K")
|
||||||
|
print("Used: \t"..tostring(math.floor((computer.totalMemory()-computer.freeMemory())/1024)).."K")
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user