Before jumping in and writing my own code, I want to find out if there is GNU/Linux software that is able to output something similar to QNX's showmem
.
For each thread of each process that is running, I would like to see the memory consumption divided into the following categories:
Process listing (Total, Code, Data, Heap, Stack, Other)
319488 1024000 24587 167936 24576 0 4103 devc-con-hid (thread 2)
0 0 0 0 4096 0 4103 devc-con-hid (thread 2)
0 0 0 0 20480 0 4103 devc-con-hid (thread 1)
0 102400 8192 0 0 0 4103 devc-con-hid (proc/boot/devc-con-hid)
0 0 16384 0 0 0 4103 devc-con-hid (proc/boot/libc.so.3)
0 0 0 0 0 ( 36864) 4103 devc-con-hid (/dev/mem)
Is there anything that will make this possible?
Best Answer
You can see some information using
pmap -x PID
- it's divided into kbytes, rss and dirty memory for each library/module/open file/stack of a process: