Almost got there! - not quite though - pgrep -P isn't reporting any further child processes...
Should pgrep -P be reporting proc ID 18480 as well?
---------- Post updated 22-10-10 at 08:55 AM ---------- Previous update was 21-10-10 at 02:57 PM ----------
I've managed to get it working (sort of).
Part of the exercise is to kill off the parent process of the problem processes anyway using another script. Therefore, once these have been killed, I'm only left with the proceses from 7133 downwards.
Dear Unix Gurus,
Here is my query.
If i start a script,it inturn calls many other scripts ..and most of them continue to run in parallel.
Suppose,if i want to stop my script for some reason,i need to kill -9 each of the processes running.It becomes clumsy if the sub processes r more.
... (15 Replies)
I am trying to get the number of cpus on a farm of linux boxes (about 100 of them) by 'sshing' to each of them and checking their /proc/cpuinfo file.
So I have a local script localscript.sh on each of those 100 machines which retrieves the number of cpus in it by using its /proc/cpuinfo file.... (1 Reply)
Hi there,
I've install a testserver with SLES 11.0! I'll install/test XEN + WebServer not all things at the moment!
In a first time, I'd like to stop all unuse processes... but I don't understand all processes!
As someone a list of all processes with his signification and which should/could... (3 Replies)
ps -xfu <user name> this command line will list all the process currently running for <user name>.
I need to filter this output. I need all the process which are running for more than 3 days(excluding demon/sys process) . The list should include PID, PPID, STIME, process/command.
I am using... (20 Replies)
Hi:
How to list processes from all hosts, as opposed to the one you are working at?
"ps ux" appears to list processes of the user on a single host only.
Thanks.
N.B Phil (5 Replies)
Hello All
I am trying to get a list of process or applications runninging on the network only. I should emphasize that im not interested in the application or process if its not using the network.
I tried the good old netstat comand, but im not able to figure out how to list the running... (8 Replies)
I am trying to kill a list of processes. I have found these two ways to list a group of process id's on a single line. How would I go about killing all of these processes all on one line?
$ ps aux | grep 6243 | grep "a.out" | awk '{printf "%s ",$2}'ps aux | grep 6243 | grep "a.out" | awk... (8 Replies)
How do I list the process in a Unix based system which are running in background?
The following are options that I'm aware of, but they may not be appropiate.
a. using ps -ef , and getting records of processes for which STATUS='S'(uninterruptible sleep)
b. using jobs -l, and filtering... (5 Replies)
Here is the output of top command
So you see 99% of memory is in use -> Mem: 66005468k total, 65662548k used,
How can I find out all processes consuming this 99% memory in descending order of consumption i.e. starting with processes eating more memory.
I need the total of the output to... (3 Replies)
Discussion started by: mohtashims
3 Replies
LEARN ABOUT MINIX
ptree
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)