Display memory information
showmem [-D type] [-d file] [-P [pid]] [-S] [-v[v]...]
You must specify at least one of these options.
The showmem utility displays memory information to help you determine how your system is using memory.
If you specify the -S option, the output includes a summary for the whole system. For example:
System RAM: 511M ( 536394752) Total Used: 381M ( 399794216) Used Private: 378M ( 396812328) Used Shared: 2912K ( 2981888)
The fields are as follows:
Use the -P option to display a summary of memory usage by the processes and shared libraries in the system. If you specify a pid, showmem displays the memory information of the specified process; if you don't, showmem displays the memory summary of all processes and shared objects.
The report is broken down into these sections:
Let's take the process devc-con-hid as an example:
Process listing (Total, Code, Data, Heap, Stack, Other) ... 819200 602112 24576 167936 24576 0 4103 devc-con-hid
Total = 602112 + 24576 + 167936 + 24576 + 0 = 819200.
For example, libc.so.3 is referenced by almost all the processes. Therefore, it's shown in the Shared section; the information for it could be like this:
Shared shared objects (Total, Code, Data, Heap, Stack, Other) ... 499712 499712 0 0 0 0 -1 proc/boot/libc.so.3
Here's another example of an entry for shared memory in the Shared section:
Shared shared objects (Total, Code, Data, Heap, Stack, Other) ... 4096 0 0 0 0 4096 -1 /dev/shmem/ctl-1002,5964,0
If you specify the -D option, showmem shows detailed process information. The Process section shows the breakdown of the code, data, stack, heap, and libraries being used by the processes. The Shared section is just the same as the Shared section shown with the -P option.
|If a value is shown in parentheses, this memory has already been accounted for the total memory information. This memory mapping might originate from within another, not allocated from system RAM.|
For example, if you specify -Dsl, the information for devc-con-hid might look like this:
Process listing (Total, Code, Data, Heap, Stack, Other) ... 319488 102400 24576 167936 24576 0 4103 devc-con-hid 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)
From the breakdown details, we can see:
Fine-Tuning Your System in the Neutrino User's Guide