01-16-2020
Sorry, somehow my copy/paste left out a bunch of lines.
Now I have corrected my original post.
--- Post updated at 11:24 ---
@nezabudka, the goal was to only show a relevant part of the process tree.
This User Gave Thanks to MadeInGermany For This Post:
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Gentoo
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
3. Red Hat
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
4. Solaris
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
5. Shell Programming and Scripting
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. ... (4 Replies)
Discussion started by: RickTrader
4 Replies
6. Linux
Please help me to find out the equivalent commands for the following solaris commands in Linux
1. ct
2. cu
3. tip
4. on
Your help will be appreciated.
Thanks in advance.
~Saravana (0 Replies)
Discussion started by: tsaravanan
0 Replies
7. UNIX for Dummies Questions & Answers
I shall explain how to setup PPP on your Linux machine, so that you can connect to the Internet using an external modem and a Dialup connection. This article explains the setup for the superuser alone (Not normal users).My Setup :
My external modem (56kbps) is connected to the Serial Port :... (0 Replies)
Discussion started by: EliteHussar
0 Replies
8. 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
ptree(1) ptree(1)
NAME
ptree - print process trees
SYNOPSIS
/usr/bin/ptree [-a] [-c] [-z zone] [pid | user] ...
ptree prints the process trees containing the specified pids or users, with child processes indented from their respective parent pro-
cesses. An argument of all digits is taken to be a process-id, otherwise it is assumed to be a user login name. The default is all pro-
cesses.
The following options are supported:
-a All. Print all processes, including children of process 0.
-c Contracts. Print process contract memberships in addition to parent-child relationships. See process(4). This option
implies the -a option.
-z zone Zones. Print only processes in the specified zone. Each zone ID can be specified as either a zone name or a numerical zone
ID.
This option is only useful when executed in the global zone.
The following operands are supported:
pid Process-id or a list of process-ids. ptree also accepts /proc/nnn as a process-id, so the shell expansion /proc/* can be
used to specify all processes in the system.
user Username or list of usernames. Processes whose effective user IDs match those given are displayed.
Example 1: Using ptree
The following example prints the process tree (including children of process 0) for processes which match the command name ssh:
$ ptree -a `pgrep ssh`
1 /sbin/init
100909 /usr/lib/ssh/sshd
569150 /usr/lib/ssh/sshd
569157 /usr/lib/ssh/sshd
569159 -ksh
569171 bash
569173 /bin/ksh
569193 bash
The following exit values are returned:
0 Successful operation.
non-zero An error has occurred.
/proc/* process files
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
|Interface Stability |See below. |
+-----------------------------+-----------------------------+
The human readable output is Unstable. The options are Evolving.
gcore(1), ldd(1), pargs(1), pgrep(1), pkill(1), plimit(1), pmap(1), preap(1), proc(1), ps(1), ppgsz(1), pwd(1), rlogin(1), time(1),
truss(1), wait(1), fcntl(2), fstat(2), setuid(2), dlopen(3C), signal.h(3HEAD), core(4), proc(4), process(4), attributes(5), zones(5)
11 Oct 2005 ptree(1)