List processes using my memory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting List processes using my memory
# 1  
Old 05-04-2016
Error List processes using my memory

Here is the output of top command
Quote:
bash-3.2$ top
top - 15:32:47 up 10 days, 17:27, 12 users, load average: 9.11, 9.92, 9.86
Tasks: 495 total, 1 running, 494 sleeping, 0 stopped, 0 zombie
Cpu(s): 14.8%us, 0.3%sy, 0.1%ni, 84.7%id, 0.1%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 66005468k total, 65662548k used, 342920k free, 1009500k buffers
Swap: 33551744k total, 292k used, 33551452k free, 41199488k cached
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:
Code:
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 ?

Last edited by rbatte1; 05-07-2016 at 05:21 PM.. Reason: Corrected spelling and changed one set of ICODE tags to CODE tags for clarity
# 2  
Old 05-04-2016
Notice how little swap you're using -- you're not struggling with low memory.

Where's it all going, then?

Code:
41199488k cached

...which counts as free for your purposes.
# 3  
Old 05-05-2016
Quote:
Originally Posted by Corona688
Notice how little swap you're using -- you're not struggling with low memory.

Where's it all going, then?

Code:
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.

Code:
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

Last edited by mohtashims; 05-05-2016 at 02:34 AM..
# 4  
Old 05-05-2016
Quote:
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 ) ?

Last edited by Corona688; 05-05-2016 at 12:44 PM..
This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX memory usage by processes

Hi, i have 2 identical web servers using AIX. I use nmon analyser to check their performance. The server A exceeds 20% memory usage for system, 5% for cache and the rest 75% for processes. While, it uses 4% of Paging Space. The server B exceeds 20% for system, 45% for cache and 35% for processes.... (24 Replies)
Discussion started by: dim
24 Replies

2. Programming

JVM processes are not getting memory allocation as soon as started

Hi, i have this scenario, when i start about 20 java processes simultaneously in unix and run ps -eaf command i can see that processes are running but memory is not getting allocated to them immediately and it stays ideal for at least 10-15 min. Meanwhile i run free command to check the RAM,... (5 Replies)
Discussion started by: Vishal Gangrade
5 Replies

3. UNIX for Dummies Questions & Answers

Finding the most memory consuming processes in Linux

Platform: Oracle Linux 6.4 To find the most memory consuming processes, I tried the following 2 methods 1. Method1 # ps aux | head -1 ; ps aux | sort -nk +4 | tail -7 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 95 0.0 0.0 0 0 ? ... (2 Replies)
Discussion started by: kraljic
2 Replies

4. AIX

Identify All Processes memory and cpu usage.

Hi All, Anyone has script to monitor AIX total processes memory and cpu usage that contribute to the total memory and CPU utilize so far ? The purpose of this is to analyze process memory trend. Thanks. Best Regards, ckwan (2 Replies)
Discussion started by: ckwan
2 Replies

5. Solaris

How get memory and cpu usages of user's processes?

I have the processes (100+) by the oracle id and I'd to get the summarized view of the oracle processes' usage of the memory and the cpu. top would give me some, but not all. Thanks (3 Replies)
Discussion started by: iwmi
3 Replies

6. Homework & Coursework Questions

processes and shared memory

Hi again! I have 2 questions ..: How can i create exactly one number of processes ? For example i want to create l*n processes and i tried this: for(i=0;i<l*n;i++){ pid=fork()} But it creates more than l*n Also, i want each child to run another x.c program with 3 command line... (1 Reply)
Discussion started by: giampoul
1 Replies

7. Homework & Coursework Questions

processes and shared memory

Hi again! I have 2 questions ..: How can i create exactly one number of processes ? For example i want to create l*n processes and i tried this: for(i=0;i<l*n;i++){ pid=fork()} But it creates more than l*n Also, i want each child to run another x.c program with 3 command line... (1 Reply)
Discussion started by: giampoul
1 Replies

8. Shell Programming and Scripting

Reserve resources (memory and processes)

I have a shell script which sets some variables and then calls modules of a program in succession, one by one. Problem is that the script is executed on servers with many users, so sometimes the script starts running, runs for 10 minutes and then breaks due to lack of resources when other users run... (1 Reply)
Discussion started by: tetreb
1 Replies

9. Shell Programming and Scripting

Processes in Shared Memory

Hello , I would like to know how to check if a given process id belongs to particualr shared memory segment . Please help Thanks in advance (3 Replies)
Discussion started by: rmv
3 Replies

10. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies
Login or Register to Ask a Question