memory being used?
NoOp
glgxg at sbcglobal.net
Tue Sep 6 02:08:02 UTC 2011
On 09/05/2011 11:50 AM, Larry wrote:
> On 09/05/2011 01:17 PM, NoOp wrote:
>> On 09/05/2011 10:07 AM, Noah wrote:
>>> Hi there,
>>>
>>> I would like to look at what programs are utilizing what memory.
>>>
>>> :~$ free -m
>>> total used free shared buffers cached
>>> Mem: 768 745 22 0 5 265
>>> -/+ buffers/cache: 474 293
>>> Swap: 1535 165 1370
>>>
>>> currently I see that I am riding my memory almost 100% utilized. I want
>>> to know what program is using that memory and how it is allocated. how
>>> can I do that?
>>>
>>> Cheers,
>>> Noah
>>>
>> Try memstat (universe repository):
>>
>> Description: Identify what's using up virtual memory
>> Lists all the processes, executables, and shared libraries
>> that are using up virtual memory. It's helpful to see how the
>> shared memory is used and which 'old' libs are loaded.
>>
>> http://manpages.ubuntu.com/manpages/natty/man1/memstat.1.html
>>
>>
>>
>>
>>
> *Why not try to view which program is using memory try too use TOP!
>
> Larry
... snip excessive & unnecesary un-sig'ed info
Well yes Larry, top will provide base memory usage. But it's rather
dynamic and it's pretty hard to tell which process is taking up how much
memory other than the top 10 or 12 processes.
That's probably a good place to start, but then the OP might want added
information. For example:
$ sudo memstat | grep xorg
32k( 24k): /usr/lib/xorg/modules/extensions/librecord.so 1251
24k( 16k): /usr/lib/xorg/modules/extensions/libdbe.so 1251
28k( 20k): /usr/lib/xorg/modules/extensions/libdri2.so 1251
44k( 36k): /usr/lib/xorg/modules/extensions/libdri.so 1251
96k( 88k): /usr/lib/xorg/modules/extensions/libextmod.so 1251
128k( 120k): /usr/lib/xorg/modules/libfb.so 1251
44k( 36k): /usr/lib/xorg/modules/input/evdev_drv.so 1251
6820k( 5680k): /usr/lib/nvidia-96/xorg/nvidia_drv.so 1251
2308k( 2308k): /usr/lib/nvidia-96/xorg/libglx.so.96.43.19 1251
So while top shows that xorg is consuming 2.8% of my memory (ridiculous
amount btw), memstat shows me what really may be sucking up the memory:
the nvidia-96 drivers. And now it makes a little more sense as to why
xorg is taking up so much memory.
You also want to give memstat a spin & see what it does/doesn't do
before discounting my suggestion.
More information about the ubuntu-users
mailing list