prstat from ptree ...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting prstat from ptree ...
# 1  
Old 02-11-2010
prstat from ptree ...

Hi,

I know how to figure out the list of PID from my application name :

ptree `pgrep MyApp` | awk '{print $1}'

But I dont know how to pipe it for prstat -p <pidlist>

ptree `pgrep MyApp` | awk '{print $1}' | prstat -p ???

I would like to monitor every ptree PID from my application.

Thanks for your help,
# 2  
Old 02-11-2010
Code:
prstat -cp "$(ptree $(pgrep YourApp)|awk '{print $1}' ORS=\ )"

You could remove the -c switch for interactive usage.
# 3  
Old 02-11-2010
MySQL

Quote:
Originally Posted by radoulov
Code:
prstat -cp  "$(ptree $(pgrep YourApp)|awk '{print $1}' ORS=\ )"


Thanks!

But do you know why it create a list of "prstat" table (back to back) ... at the place to have one prstat table at the top of my screen (refreshing) ?

Regards,
# 4  
Old 02-11-2010
Quote:
Originally Posted by RickTrader
Thanks!

But do you know why it create a list of "prstat" table (back to back) ... at the place to have one prstat table at the top of my screen (refreshing) ?

Regards,
Because I've used the -c switch, just remove it:

Code:
prstat -p ...

# 5  
Old 02-11-2010
Quote:
Originally Posted by radoulov
Because I've used the -c switch, just remove it:

Code:
prstat -p ...


Ok, Thx Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

[Tip] ptree for Linux

Unix (and Linux) uses a process tree that gives a natural security, by simple inheritance of attributes. The following ptree script shows it. It runs on all Linux flavors. Mostly useful for debugging. #!/bin/sh # Solaris style ptree && exec /usr/bin/ptree "$@" ... (6 Replies)
Discussion started by: MadeInGermany
6 Replies

2. Linux

similar command of ptree in linux

Hello guys, Is there any command to check the all child processes of a process like `ptree`? ptree is not working in Linux.. Regards, Raghu (3 Replies)
Discussion started by: raghu.iv85
3 Replies

3. Solaris

rlogin under ptree (vsh is high)

Hi, Recently did a ptree on a vsh PID and found that the only child process underneath the vsh parent is rlogin (telnet session(s)). Is there any way to drill down further from here? What causes rlogin to make vsh go high or is it rlogin? The cpu utilization at times is at 48-49%. We want to... (0 Replies)
Discussion started by: troystevens
0 Replies

4. Shell Programming and Scripting

ptree equivalent for IBM machine

Hi does anyone know of the equivalent of "ptree <PID>" command which can be used on IBM (AIX) machine. I was trying to use "ptref" but it produces too many lines of "unrelated " to the PID output. May be someone has this issue before. Thanks a lot -A (2 Replies)
Discussion started by: aoussenko
2 Replies

5. Solaris

kill the processes seen under ptree

Hi, How to kill the processes running under ptree ? I am noticing lot of processes running under ptree with ssh ? I tried to kill with -9 option which is not working ? Thanks, Radhika. (2 Replies)
Discussion started by: radhirk
2 Replies

6. Red Hat

pfiles and pstack and ptree

Can someone tell me the Linux equivalent for pstack and pfiles and ptree which are Solaris commands. (1 Reply)
Discussion started by: bdsffl
1 Replies

7. Gentoo

ptree for linux

at work, I'm a UNIX administrator, but at home I use openSUSE 11. One of the commands that I use to assist me in trouble shooting A LOT is called ptree process tree. does anyone know of a ptree for linux? yes, I can just use ps -ef and see who the parent pid is and then 'ps -ef | grep <parent... (4 Replies)
Discussion started by: james.witte
4 Replies

8. Shell Programming and Scripting

equivalent of ptree command in zsh

ptree command is not working in zsh. Could anyone let me know the equivalent of ptree command in zsh. (3 Replies)
Discussion started by: dhams
3 Replies

9. Shell Programming and Scripting

killing PID's of ptree

gurus, normally to stop a process ,i need to kill all its child & then parent process. i do it manually as follows bash-2.03$ ps -ef | grep bpm|grep -v grep tibadmin 21882 21875 0 May 27 ? 0:00 /bin/sh ./bpmse_20.sh -Xms512m -Xmx512m /tibco/UpdateCustomer/dat/UpdateCustome ... (0 Replies)
Discussion started by: abhijeetkul
0 Replies

10. Shell Programming and Scripting

Meaning of ps -afe ,ps -fp and ptree

Hello, I was searching for the meaning of commands like ps -afe ,ps -fp and ptree but was not able to find there exact meaning .... Pls help me in getting these... Thanks in advance, Pradeep (1 Reply)
Discussion started by: PradeepRed
1 Replies
Login or Register to Ask a Question