Add a new param --top to pcstat, it reads the /proc/[pid]/stat files, and finds those processes who's rss is not 0, then collects all the files opened by those processes, gets stats and sort them by cached pages.
Hmm I don't think that we should merge the copied code since go-ps has a different license. I'll take another look at how to do this without potentially misusing someone else's license & code.
16
Add a new param --top to pcstat, it reads the /proc/[pid]/stat files, and finds those processes who's rss is not 0, then collects all the files opened by those processes, gets stats and sort them by cached pages.
Here is an example: