LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2011, 01:00 PM   #1
aggala
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
Listing of LWP for a PID


Hello ,

How do we get all the LWP for a PID with cpu% and mem% and the thread id

Something equivalent as prstat -L -P pid on Solaris which lists all the threads being used with CPU% and MEM%


Thank you very much
 
Old 01-13-2011, 01:34 PM   #2
cin_
Member
 
Registered: Dec 2010
Posts: 277

Rep: Reputation: 24
top()

Code:
# top
Check out...
Code:
# man top
..for commands.

Once you are in top you can sort by using Shift-M for %MEM, and Shift-P for %CPU.

You can use top with a single PID..
Code:
# top -p PID
..and cat the info as needed...



Also, check out the man pages for free(), and vmstat()... might have even more info that you could use as well...
 
Old 01-19-2011, 12:14 PM   #3
aggala
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the reply but my main question is how to get all the Light weight process for the PID. When i give top -p PID it gives COU MEM ETC for the PID and it will not display all the LWP of THE PID


Looking forward for the reply

Thx
 
Old 01-19-2011, 12:41 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, welcome to LQ!

Something like:
Code:
ps -eLo pid,lwp,pcpu,vsz,comm
maybe?

Mind you, nothing a "man ps" wouldn't have revealed.



Cheers,
Tink
 
  


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
What is the more easier way to check the pid and kill the pid cmx08 Linux - General 5 09-09-2008 11:57 PM
reading pid from pid file in C language shifter Programming 1 05-14-2008 11:49 AM
kill pid.... won't work with 'pid' variable given.. sachitha Programming 6 03-06-2006 08:48 PM
How do I get the LWP pid of linux threads? ninelion Programming 4 08-16-2005 09:32 PM
/var/run/[XXX].pid - Tcl pid code liguorir Linux - Software 1 05-20-2004 11:32 PM


All times are GMT -5. The time now is 06:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration