Linux Application Disk and Memory Usage
Are there any utilities (either built into Linux or 3rd party) which
can provide me with the follwoing information for each individual application installed on a linux server: 1. static/dynamic disk requirements (I don't know if that's how linux refers to it, but speaking in Windows terminology, I hope that the idea is presented). 2. static/dynamic memory usage Thanks, Kushal |
I'm not sure I understand, or whether the distinction
makes sense, specially when it comes to dynamically loaded applications ... if 10 different apps rely on say 15 common libs, and each had 2 other libs on top of the shared ones, would you allot the shared libs to each of them? That said: you can easily find out which libs a program is linked against, and from that determine their sizes. ldd /path/to/program And for the memory usage ps and/or top Cheers, Tink |
Quote:
Long and vocal have been the debates about how to measure (let alone apportion) memory usage in Linux. My curent favourite is smaps, but even that leaves shared libary usage up in the air. |
I suppose the question is how granular you need it, or
whether you're happy with what MIGHT get used. For many purposes the output of tops RES - SHR will do just fine. But yes, this has been argued over a fair bit :} Cheers, Tink |
good comments.
memory usage was a point of frustration as a developer for me until smaps. smaps makes it all better. as for dynamic disk usage. the writable data segment of the ELF is (i think) a part of the memory data segment. there are certainly some tools for looking at the elf executable but i have never used these so i can't say much about them. http://www.penguin-soft.com/penguin/man/1/elfsh.html http://kerneltrap.org/man/linux/man5/elf.5 i think this is an api to get the value of Dv PF_W at runtime ?? which is the writable data segment. |
All times are GMT -5. The time now is 05:12 AM. |