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.
Without argument it displays the full process tree, like the pstree command.
When there is a PID argument (number), it shows the part of the process tree with the PID - that is the PID's ancestors and descendants.
Also there can be a USER argument, then it shows the USER's processes from the tree.
A quick exercise: where is my current shell from?
Last edited by MadeInGermany; 01-16-2020 at 04:40 AM..
These 5 Users Gave Thanks to MadeInGermany For This Post:
The -H is specific to GNU ps (Linux).
It does an indentation (two spaces per hierarchy level) without any ASCII art. This is easy to post-process i.e. filter for the releavant parts.
This User Gave Thanks to MadeInGermany For This Post:
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)
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)
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)
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)
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)
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)
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)