LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-02-2007, 09:12 AM   #1
kushalag
LQ Newbie
 
Registered: Aug 2007
Posts: 4

Rep: Reputation: 0
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
 
Old 08-03-2007, 04:30 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
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
 
Old 08-03-2007, 04:57 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,286

Rep: Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030
Quote:
Originally Posted by Tinkster
And for the memory usage ps and/or top
We wish ...
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.
 
Old 08-03-2007, 04:13 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
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
 
Old 08-03-2007, 06:26 PM   #5
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command to show each application/process memory usage and its total gn00kie Linux - Enterprise 2 09-21-2006 03:08 AM
Memory Usage on Linux lchand_p Linux - Software 2 06-19-2006 06:17 AM
Need Monitor the CPU, Memory and Disk Usage srikanthrao_d Linux - Software 2 12-28-2005 08:15 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Linux and Memory usage ganninu Linux - General 8 12-15-2003 07:33 AM


All times are GMT -5. The time now is 04:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration