List processes using my memory

Here is the output of top command

So you see 99% of memory is in use -> Mem: 66005468k total, 65662548k used,

How can I find out all processes consuming this 99% memory in descending order of consumption i.e. starting with processes eating more memory.

I need the total of the output to match 99% as seen in the top command.

Note: I do not have root access.

OS:

bash-3.2$ uname -a
Linux myserver 2.6.18-409.el5 #1 SMP Fri Feb 12 06:37:28 EST 2016 x86_64 x86_64 x86_64 GNU/Linux

Also can I can get the output in the form of percentage of total memory consumption and the value of memory being consumed ?

Notice how little swap you're using -- you're not struggling with low memory.

Where's it all going, then?

41199488k cached

...which counts as free for your purposes.

Dont know why i m not able to start a java process and i get this error regarding memory.

Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 12).
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
<May 5, 2016 1:26:25 AM> <FINEST> <NodeManager> <Waiting for the process to die: 26500>
<May 5, 2016 1:26:25 AM> <INFO> <NodeManager> <Server failed during startup so will not be restarted>

Shouldn't it empty the cache automatically and assign some memory to my process ?

Should i empty the cache ? If yes, How can i do that ?

Will it help me resolve my issue because i am not able to start any java processes on this system.

Any drawback or issues with release the 41199488k cached

Problem #1: It does not need releasing. It releases itself. That's why you have nearly no swap used, you're not out of memory.
Problem #2: Forcing it from 'cache' into 'free' will decrease performance for no benefit.
Problem #3: It is unlikely to solve any of your problems.

"unable to allocate shared memory" is not the same thing as "out of memory"; On Linux, that likely refers to a ramdisk residing in /dev/shm whose maximum capacity -- and what it's willing to give it to -- depends on your system settings. What's the status of /dev/shm on your system (df -h ) ?

1 Like