ps_mem
ps_mem copied to clipboard
Add -u option for one unit size - issue/#39
This pull request add a -u option to allow setting one unit size to like df -k. usage:
$ sudo ./ps_mem.py -u k
Private + Shared = RAM used Program
......
22180 KiB + 80 KiB = 22260 KiB docker-containerd
37748 KiB + 568 KiB = 38316 KiB netdata
61436 KiB + 265 KiB = 61701 KiB dockerd
---------------------------------
197820 KiB
=================================
option -u , --unit=U Unit size. U are b,k,m,g,t (powers of 1024). Default unit is KiB. b: byte k: KiB m: MiB g: GiB t: TiB
Note this will mess up alignment Also aligment may change over time Note the --total output is unformatted and so useful for processing/monitoring Can you describe your use case in detail.
thanks
One unit size is useful when I want to find out what process is large private or shared memory, in all processes. If there is a sorting option by private or shared memory, this pull request may not be necessary.
thanks