Sponsored Content
Operating Systems AIX Command to find TOP 5 Memory consuming process Post 302313822 by bce_groups on Wednesday 6th of May 2009 02:35:48 PM
Old 05-06-2009
Command to find TOP 5 Memory consuming process

HI All,

Can anyone send me a command to find TOP 5 Memory consuming process.
It would be lelpful if I get output something like below
processname - pid - memory(in MB) - command

I tried few commands from the internet but the result only give the real memory usage or pagging, I want total memory usage of the process.

I also tried using topas and vmon but the result seems to be inaccurate.

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can i extract only the Memory line from top command ?

Hello all i need in csh to extract only the Memory line from the out put of the top command how can it easily done (1 Reply)
Discussion started by: umen
1 Replies

2. AIX

Process consuming most memory

How can i find the processes that is consuming most memory? I tried TOPAS and SVMON and this didn't gave me the desired result. (1 Reply)
Discussion started by: shabu
1 Replies

3. Shell Programming and Scripting

Command to find the Memory and CPU utilization using 'top' command

Hi all, I found like top command could be used to find the Memory and CPU utilization. But i want to know how to find the Memory and CPU utilization for a particular user using top command. Thanks in advance. Thanks, Ananthi.U (2 Replies)
Discussion started by: ananthi_ku
2 Replies

4. Shell Programming and Scripting

Warning in Top 10 cpu consuming processes

I m using following command to find top 10 cpu consuming processes. However whenever i execute the command i get following warning. What can be done to avoid it? # ps -auxf | sort -nr -k 3 | head -10 Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ root ... (6 Replies)
Discussion started by: pinga123
6 Replies

5. Shell Programming and Scripting

Discrepancy in finding the top memory consuming processes

When I run 'top' command,I see the following Memory: 32G real, 12G free, 96G swap free Though it shows as 12G free,I am not able to account for processes that consume the rest 20G. In my understanding some process should be consuming atleast 15-16 G but I am not able to find them. Is... (1 Reply)
Discussion started by: prasperl
1 Replies

6. Shell Programming and Scripting

Unix shell script to query linux top consuming processes

Hi All, O/S: Linux 86x64 Red Hat I have a sql script that queries top consuming processes of Linux using TOP commnd. Now I need to automate this task and pass the top processes i.e., PID to the sql script through unix shell script. Could anyone please let me know how to achieve this. ... (2 Replies)
Discussion started by: a1_win
2 Replies

7. Red Hat

How to find memory taken by a process using top command?

I wanted to know how to find the memory taken by a process using top command. The output of the top command is as follows as an example: Mem: 13333364k total, 13238904k used, 94460k free, 623640k buffers Swap: 25165816k total, 112k used, 25165704k free, 4572904k cached PID USER ... (6 Replies)
Discussion started by: RHCE
6 Replies

8. AIX

Which process was consuming most memory in the Past?

Hello There are options / commands to check which process is consuming maximum memory However is there any command/mechanism which will tell us which process was consuming maximum memory in specific time interval in the past? I heard nmon report can help in this regard. is there any... (5 Replies)
Discussion started by: Chetanz
5 Replies

9. Shell Programming and Scripting

Kill top 5 memory uses process

Hi All, how to kill 5 top memory used process in my hp-ux. Thanks, Kki (9 Replies)
Discussion started by: kki
9 Replies

10. UNIX for Beginners Questions & Answers

Top 5 cpu and Mem consuming process and files and suggestion for health check

I am middle of writing health check scripts, can you pls share commands on how I can get cpu and Mem of top consuming process info at the moment? Also can u suggest ideas on what all I can look for as a part do health check on red hat Linux server? I searched on site before posting, but... (2 Replies)
Discussion started by: Varja
2 Replies
leaks(1)						    BSD General Commands Manual 						  leaks(1)

NAME
leaks -- Search a process's memory for unreferenced malloc buffers SYNOPSIS
leaks pid | partial-executable-name | memory-graph-file [-list] [-groupByType] [-nocontext] [-nostacks] [-nosources] [-quiet] [-exclude symbol] [-trace address] [-outputGraph path] [-fullContent] [-atExit] DESCRIPTION
leaks identifies leaked memory -- memory that the application has allocated, but has been lost and cannot be freed. Specifically, leaks examines a specified process's memory for values that may be pointers to malloc-allocated buffers. Any buffer reachable from a pointer in writable global memory (e.g., __DATA segments), a register, or on the stack is assumed to be memory in use. Any buffer reachable from a pointer in a reachable malloc-allocated buffer is also assumed to be in use. The buffers which are not reachable are leaks; the buffers could never be freed because no pointer exists in memory to the buffer, and thus free() could never be called for these buffers. Such buf- fers waste memory; removing them can reduce swapping and memory usage. Leaks are particularly dangerous for long-running programs, for even- tually the leaks could fill memory and cause the application to crash. leaks requires one argument -- either the process ID or the full or partial executable name of the process to examine, or the pathname of a memory graph file generated by leaks or the Xcode Memory Graph Debugger. Once the leaked buffers have been identified, leaks analyzes them to find "root leaks" (those which are not referenced by any other buffer) and "root cycles" (cycles of objects which reference or retain each other, but which are not referenced by any other buffer outside the cycle). Then, it identifies the tree of buffers which are referenced by those root leaks and root cycles, if any. leaks then prints each such "leak tree". If the MallocStackLogging environment variable was set when the application was launched, leaks also prints a stack trace describing where the buffer was allocated. MEMORY GRAPH FILES
A memory graph file archives the memory state of a process for further analysis at a later time, on a different machine, or by other people. It includes information about all VM and malloc nodes in the process, and the references between them. Memory graph files can be generated by leaks using the -outputGraph option (and the -fullContent option if desired), or by examining a live process with the Xcode Memory Graph Debugger then using the Export Memory Graph menu item from the File menu. The standard filename suffix for memory graph files is ".mem- graph". These files can be used as input to various commands including leaks, heap, stringdups, vmmap, malloc_history, footprint, and the Xcode Memory Graph Debugger. OPTIONS
-list Print the leaks as a list ("classic"-style) rather than as a tree. Warning: this option may be removed in the future. -groupByType When printing a tree of leaked objects, group the children of a node in the tree by type, rather than showing individual instances. -nocontext Do not print the string or hex representation of leaked memory. Although that information can be useful for recognizing the contents of the buffer and understanding why it might be leaked, it can also provide overwhelming detail, and could expose con- fidential information from your process if you, for example, file bug reports with that output included. -nostacks Do not print backtraces of leaked blocks even if the target process has the MallocStackLogging environment variable set. -nosources Do not print sourceFile:lineNumber in backtraces. This can improve performance when examining a process with a huge number of debug symbols. -quiet Do not print process description header or binary image list. -exclude symbol Exclude leaked blocks whose backtraces include the specified symbol. This option can be repeated for multiple symbols. This allows ignoring leaks that, for example, are allocated in libraries for which you do not have source code. -trace address Print chains of references from process 'roots' (e.g., global data, registers, or locations on stacks) to the given block. This is useful for determining what is holding onto a buffer such that it has not been freed. -outputGraph path Generate a memory graph file containing information about all VM and malloc nodes, and the references between them. path can be a path to a file, or just a directory name; in the latter case a filename with the ".memgraph" suffix will be generated. -fullContent When generating a memory graph file, include descriptions of the content of various objects, as would be shown by "heap <pid> -addresses all", and as needed by "stringdups <pid>". -atExit Launches the specified process and runs leaks when the process exits. The process to launch must be the end of the command, and proceeded by '--': leaks -atExit -- /MyPath/MyProgram -MyArg ENVIRONMENT
The leaks command may detect more leaks if the target process is run with the MallocScribble environment variable. If this variable is set then when malloc blocks are deallocated they are filled with 0x55 bytes, thus overwriting any "stale" data such as pointers remaining in those blocks. This reduces the number of false pointers remaining in the process memory. EXIT STATUS
The leaks command exits with one of the following values: 0 No leaks were detected. 1 One or more leaks were detected. >1 An error occurred. SEE ALSO
malloc(3), heap(1), malloc_history(1), stringdups(1), vmmap(1), footprint(1), DevToolsSecurity(1) The Xcode Memory Graph Debuggger graphically shows malloc blocks and VM regions (both leaked and non-leaked), and the references between them. The Xcode developer tools also include Instruments, a graphical application that can give information similar to that provided by leaks. The Allocations instrument graphically displays dynamic, real-time information about the object and memory use in an application, including back- traces of where the allocations occurred. The Leaks instrument performs memory leak analysis. BSD
May 6, 2018 BSD
All times are GMT -4. The time now is 01:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy