Timeline for How to view summaric memory usage of groups of commands (instead of processes)
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 9, 2015 at 12:44 | history | edited | RahulAN | CC BY-SA 3.0 |
added 4 characters in body
|
| Oct 9, 2015 at 12:41 | comment | added | RahulAN | You can can use ` ps ax -o pmem,fname | sort -r` for getting correct name of Process executable | |
| Oct 9, 2015 at 12:39 | comment | added | korda |
Yes, beacuse ps add spaces to indent stuff. When one process has 2 digit usage one digit usage values will be indented and will start with leading space. I guess adding something like sed -e 's/^[[:space:]]*//' should fix it. Also does your script adds up memory usage of processes with same command?
|
|
| Oct 9, 2015 at 12:33 | comment | added | RahulAN | You mean you are not getting correct name of process?? | |
| Oct 9, 2015 at 10:52 | comment | added | korda | It's not working for me. I guess the reason is that sort includes leading white space | |
| Oct 9, 2015 at 9:28 | comment | added | RahulAN | Is it? Well you want some thing like top?? if yes then you can modify the script with delay of 2 or 1 sec and run the same thing in some while or for. For me it shows the highest Memory usage Application at the time i run this Script. what kind of stuff you are trying, just run : ps af -o pmem,cmd | sort -r It will give you the highest mem usage application | |
| S Oct 9, 2015 at 9:22 | history | suggested | korda | CC BY-SA 3.0 |
r formatting
|
| Oct 9, 2015 at 9:02 | review | Suggested edits | |||
| S Oct 9, 2015 at 9:22 | |||||
| Oct 9, 2015 at 8:59 | comment | added | korda | I've tried to get this working and it didn't give me interestening results. For example it only shows one program, and it isn't the one taking up the most of the memory | |
| Oct 9, 2015 at 8:48 | history | edited | RahulAN | CC BY-SA 3.0 |
added 4 characters in body
|
| Oct 9, 2015 at 7:58 | history | answered | RahulAN | CC BY-SA 3.0 |