Count only filtered pids

If '-t' is specified and a filter such as '-U me' is specified, the
pid total displayed is the total number of pids instead of the number
of filtered pids.
This commit is contained in:
Paul Townsend 2011-12-05 22:42:38 -06:00
commit 4a835dff67

2
smem
View file

@ -269,7 +269,7 @@ def showpids():
return pidusername(p) return pidusername(p)
fields = dict( fields = dict(
pid=('PID', lambda n: n, '% 5s', lambda x: len(p), pid=('PID', lambda n: n, '% 5s', lambda x: len(pt),
'process ID'), 'process ID'),
user=('User', showuser, '%-8s', lambda x: len(dict.fromkeys(x)), user=('User', showuser, '%-8s', lambda x: len(dict.fromkeys(x)),
'owner of process'), 'owner of process'),