Sponsored Content
Top Forums Shell Programming and Scripting List processes using my memory Post 302972380 by mohtashims on Wednesday 4th of May 2016 03:39:08 PM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

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

8. 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

9. 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

10. 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
FREE(1) 							Linux User's Manual							   FREE(1)

NAME
free - display information about free and used memory on the system SYNOPSIS
free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay ] [-c count ] DESCRIPTION
free(1) displays the total amount of free and used physical memory and swap space in the system, as well as the buffers and cache consumed by the kernel. OPTIONS
Normal invocation of free(1) does not require any options. The output, however, can be fine-tuned by specifying one or more of the follow- ing flags: -b, --bytes Display output in bytes. -k, --kb Display output in kilobytes (KB). This is the default. -m, --mb Display output in megabytes (MB). -g, --gb Display output in gigabytes (GB). -l, --lowhigh Display detailed information about low vs. high memory usage. -o, --old Use old format. Specifically, do not display -/+ buffers/cache. -t, --total Display total summary for physical memory + swap space. -c n, --count=n Display statistics n times, then exit. Used in conjunction with the -s flag. Default is to display only once, unless -s was speci- fied, in which case default is to repeat until interrupted. -s n, --repeat=n Repeat, pausing every n seconds in-between. -V, --version Display version information and exit. --help Display usage information and exit FILES
/proc/meminfo -- memory information SEE ALSO
ps(1), top(1), vmstat(1) AUTHORS
Written by Robert Love. The procps package is maintained by Rik van Riel and Robert Love and was created by Michael Johnson. Send bug reports to <procps-list@redhat.com>. Linux 18 Nov 2002 FREE(1)
All times are GMT -4. The time now is 03:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy