10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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. Red Hat
i have a Intel Quad Core Xeon X3440 (4 x 2.53GHz, 8MB Cache, Hyper Threaded) with 16gig and 1tb harddrive with a 1gb port and my apache is causing my cpu to go up to 100% on all four cores heres my http.config
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 15... (4 Replies)
Discussion started by: awww
4 Replies
3. Solaris
Hi,
I am working on a solaris app processor and the vsh goes high from time to time. I have executed various ps commands and switches and have found that it looks like the rlogind daemon is terminating vsh and not cleaning up after itself. There are also something like 10 zombies hanging around... (2 Replies)
Discussion started by: troystevens
2 Replies
4. 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
5. 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
6. 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
7. 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
8. Shell Programming and Scripting
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
9. UNIX for Advanced & Expert Users
Hi,
I am seeing very high kernel usage and very high load averages on my system (Although we are not loading much data to our database). Here is the output of top...does anyone know what i should be looking at?
Thanks,
Lorraine
last pid: 13144; load averages: 22.32, 19.81, 16.78 ... (4 Replies)
Discussion started by: lorrainenineill
4 Replies
10. 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
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)