Skip to content

Commit

Permalink
docker in group
Browse files Browse the repository at this point in the history
  • Loading branch information
inv2004 committed Mar 25, 2024
1 parent 98e2800 commit 79fe019
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ttop/procfs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ proc sort*(info: FullInfoRef, sortOrder = Pid, threads = false, group = false) =
sort(info.pidsInfo, sortFunc(sortOrder))

proc id(cmd: string): string =
let idx = cmd.find(' ')
let idx = cmd.find({' ', ':'})
if idx >= 0:
cmd[0..<idx]
else:
Expand All @@ -575,6 +575,8 @@ proc group*(pidsInfo: OrderedTableRef[uint, PidInfo]): OrderedTableRef[uint, Pid
g.uptime = pi.uptime
else:
g.uptime = min(g.uptime, pi.uptime)
if g.docker == "":
g.docker = pi.docker
g.name = id
g.mem += pi.mem
g.rss += pi.rss
Expand Down

0 comments on commit 79fe019

Please sign in to comment.