LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 12: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, 12:34 PM   #2
cin_
Member
 
Registered: Dec 2010
Posts: 281

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, 11:14 AM   #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, 11:41 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:39 PM.

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