LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-20-2003, 04:53 AM   #1
srinivasar
LQ Newbie
 
Registered: Sep 2003
Location: Chennai
Posts: 7

Rep: Reputation: 0
help me resource usage


Hi,

I am working on finding out my applications resource usage.

I tried to build a tool using java.
in that i executed the command ps -eo 'pcpu,rss,pid,ppid,args' to find the %cpu , memory usage.

My application spawn's 'n' no of threads. I need to consider all the thread's to find the resource usage.

With the above command , whether i am in the track or not.

Pl. help me in this regard.

Thanks
 
Old 09-20-2003, 04:05 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,536

Rep: Reputation: 178Reputation: 178
"I need to consider all the thread's to find the resource usage."

I am not certain but I think that the ps command you describe will show the resource usage for all threads running under the same user ID as your Java program, not just the 'n' threads that your Java program spawned.
 
Old 09-21-2003, 03:18 AM   #3
srinivasar
LQ Newbie
 
Registered: Sep 2003
Location: Chennai
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks Steve ,

It's the case in solaris which will show the total resource usage as my parent application , but in linux it will show each thread as separate process.

If i am wrong correct me

Thanks for the reply
 
Old 09-21-2003, 03:44 AM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
correct me if i'm wrong, but don't java apps just show up in ps as "java" so if more than one java app is running, how could you ever find out the usage of a particular java app?
 
Old 09-21-2003, 03:56 AM   #5
srinivasar
LQ Newbie
 
Registered: Sep 2003
Location: Chennai
Posts: 7

Original Poster
Rep: Reputation: 0
Hi

having PGID in the ps command we can separate the several java applications.

PGID will be the pid of the parent process which spawn this process.

We can see the same using the following command
ps -eo 'pcpu,rss,pid,pgid,args'

Presently i am having doubt in finding the swapped out memory utilized by the application.

Memory Usage = rss + Swapped out memory.

Pl .let me know , if you know solution for the swapped memory.

Thanks
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FC4 Resource Usage dudeman41465 Fedora 3 10-21-2005 01:07 AM
any software that monitors resource usage? similar to ps aux every second cpanelskindepot Linux - Software 9 08-28-2004 04:56 PM
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
command for checking system resource usage? yeahoo7 Linux - Networking 3 06-11-2003 11:31 PM
How to Limit Runtime Resource Usage Skywings Programming 0 11-22-2001 07:45 PM


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

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