This commit is contained in:
2025-09-29 00:03:57 -04:00
parent 5111182a4b
commit abd573f686
64 changed files with 2407 additions and 157 deletions

23
disks/1h/bin_/top Normal file
View File

@@ -0,0 +1,23 @@
local hpv=require("hypervisor")
local term=component.getFirst("screen")
term.clear()
local function m(str, m)
if #str>m then
return str:sub(1,m-1).."- "
else
while #str~=m do
str=str.." "
end
return str.." "
end
end
for i in hpv.listProc() do
term.print(m(i.name, 15)..m(i.status, 7)..m(i.pid, 4))
for _,v in ipairs(i.threads) do
if v.name~="main" then
term.print(" "..m(v.name, 12)..m(v.status, 7))
end
end
end