LinuxQuestions.org
Visit Jeremy's Blog.
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 05-14-2006, 03:33 AM   #1
tsenthilt
LQ Newbie
 
Registered: May 2006
Posts: 4

Rep: Reputation: 0
Question Stack usage of an application


Dear Team,
I would like find a maximum stack usage of an application. Kindly let me know how it is possible. I hope are there are some standard tool/solution available for it. Please reply me back.
Thanking you,
T.Senthil Nathan
 
Old 05-14-2006, 03:44 AM   #2
taxtropel
Member
 
Registered: Mar 2005
Location: Cascade Mountains WA USA
Distribution: Linux From Scratch (LFS)
Posts: 149

Rep: Reputation: 16
you do so with the ulimit command
see the bash man page
 
Old 05-14-2006, 04:16 AM   #3
tsenthilt
LQ Newbie
 
Registered: May 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Dear Mr.taxtropel & Linux users
I just saw the man page of ulimit with stack usages, it is just displaying the maximum allowable limit for an application. Sorry my question is, how do you find, how much stack is used/utilized by an application with in the given limit. Kindly reply me back.
Thanking you,
T.Senthil Nathan.
 
Old 05-14-2006, 05:36 AM   #4
taxtropel
Member
 
Registered: Mar 2005
Location: Cascade Mountains WA USA
Distribution: Linux From Scratch (LFS)
Posts: 149

Rep: Reputation: 16
Cool

reply, oh, that's easy...first you need to find the programs PID
(process ID)

do that with ps
Code:
 ps -A
will give you the PID for ALL process running on the entire system

next go to the /proc folder
Code:
 cd /proc
then enter the folder which matches the PID

Code:
 cd 17109
then view the status file for that process

Code:
 cat status
it will look something like this...

Code:
Name:   X
State:  S (sleeping)
SleepAVG:       98%
Tgid:   17109
Pid:    17109
PPid:   17107
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 256
Groups:
VmPeak:   354104 kB
VmSize:   167596 kB
VmLck:       104 kB
VmHWM:    198224 kB
VmRSS:    142208 kB
VmData:   153828 kB
VmStk:        96 kB
VmExe:      1580 kB
VmLib:      9804 kB
VmPTE:       332 kB
Threads:        1
SigQ:   0/6141
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 00000000518066cb
CapInh: 0000000000000000
CapPrm: 00000000fffffeff
CapEff: 00000000fffffeff
the stack is listed as "VmStk"

hope this helps
 
Old 05-14-2006, 05:57 AM   #5
tsenthilt
LQ Newbie
 
Registered: May 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Ok, is it a peak usage of stack or the current utilization of stack ?. Any way I would like to know the peak utilization of stack. It would be better, if it displays in terms of byte level granularity.
Thanking you,
T.Senthil Nathan.
 
Old 05-14-2006, 10:09 AM   #6
tsenthilt
LQ Newbie
 
Registered: May 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Dear Mr.taxtropel & Linux users,
Basically I would like to plot a graph which contains time in X-Axis and Stack usage in Y-Axis over the time. Please let me know how you can track the stack usage for an application over the time, the application may run only for few milliseconds. Kindly reply me back ASAP.
Thanking you,
T.Senthil Nathan.
 
  


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
Usage of pipes in multithreaded application.... rajsun Programming 1 01-13-2006 06:40 AM
LXer: Managing an Open Source Application Stack with Aduva OnStage LXer Syndicated Linux News 0 12-28-2005 05:31 AM
Any application that monitors usage time just like in cyber cafe? Niceman2005 Linux - Software 0 10-27-2005 08:44 AM
How to get current stack usage phuna Programming 4 08-11-2005 09:25 PM
Inhibiting the usage of some keys when running an application under KDE Paulo Góes Linux - Hardware 6 07-05-2003 09:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration