LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2009, 08:26 AM   #1
nagavinodh
Member
 
Registered: Aug 2009
Posts: 118

Rep: Reputation: 15
pstree


hi,
how to use the pstree command.
i tried to execute pstree -p | grep 80 ---> (apache port number)
it shown some details i cann't understand that

output is

[root@ebs ~]$ pstree -p | grep 80
‚ ‚ ‚‚java(5480)
‚ ‚ ‚‚java(5800)
‚ ‚ ‚‚java(5803)
‚ ‚ ‚‚java(5680)
‚ ‚ ‚‚java(5807)
‚ ‚‚java(5808)
‚‚atd(2805)
‚ ‚‚f60webmx(24801)
‚ ‚‚httpd(3180)‚‚‚httpd(3184)‚‚‚httpd(3186)
‚‚oracle(5802)
‚‚oracle(24805)
[root@ebs ~]$

please anyone explain that
 
Old 11-30-2009, 08:32 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,577
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
The weird formatting has to do with a difference between your terminal type and default translation. Linux usually uses UTF-8. If you're using something like PuTTY it might be defaulting to something else so you need to change translation setting in PuTTY to UTF-8 to match.

The output you got is showing there is nothing running on port 80. The other items matched because their port numbers including "80". The grep command matches anything that has "80" as a component (which is to say it will match just "80" if it is there but also "180", "280", "12380456" etc...)
 
Old 12-01-2009, 02:04 AM   #3
nagavinodh
Member
 
Registered: Aug 2009
Posts: 118

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jlightner View Post
The weird formatting has to do with a difference between your terminal type and default translation. Linux usually uses UTF-8. If you're using something like PuTTY it might be defaulting to something else so you need to change translation setting in PuTTY to UTF-8 to match.

The output you got is showing there is nothing running on port 80. The other items matched because their port numbers including "80". The grep command matches anything that has "80" as a component (which is to say it will match just "80" if it is there but also "180", "280", "12380456" etc...)
hi,

Thanks for reply.


thanks for reply.
i can't understand the outout.can i find a particular session id.what is the purpose of pstree.
how to find which one is the parent process and its child process. can i find hunging process?

i posted the output please anyone explian that.

root@server2 /# pstree -up applydev
FNDSM(5409)‚‚¨‚CYQLIB(5690)
‚‚FNDCRM(6154)
‚‚FNDLIBR(6163)
‚‚FNDLIBR(6209)
‚‚FNDLIBR(28086)
‚‚FNDLIBR(28087)
‚‚FNDLIBR(28088)
‚‚FNDLIBR(28091)
‚‚INCTM(5689)
‚‚INVLIBR(6230)
‚‚MRCLIB(6234)
‚‚PALIBR(6198)
‚‚POXCON(5692)
‚‚RCVOLTM(5691)
‚‚RCVOLTM(5693)
‚‚java(5694)‚‚‚java(5695)‚‚¨‚java(5696)
‚ ‚‚java(5697)
‚ ‚‚java(5698)
‚ ‚‚java(5699)
‚ ‚‚java(5700)
‚ ‚‚java(5701)
‚ ‚‚java(5702)
‚ ‚‚java(5703)
‚ ‚‚java(5704)
‚ ‚‚java(5705)
‚ ‚‚java(5706)
‚ ‚‚java(5707)
‚ ‚‚java(5708)
‚ ‚‚java(6003)
‚ ‚‚java(6004)
‚ ‚‚java(6033)
‚ ‚‚java(6034)
‚ ‚‚java(6254)
‚ ‚‚java(6257)
‚ ‚‚java(6261)
‚ ‚‚java(6263)
‚ ‚‚java(6265)
‚ ‚‚java(6271)
‚ ‚‚java(6272)
‚ ‚‚java(6299)
‚ ‚‚java(6302)
‚ ‚‚java(6321)
‚ ‚‚java(6329)
‚ ‚‚java(6472)
‚ ‚‚java(6486)
‚ ‚‚java(6487)
‚ ‚‚java(6981)
‚ ‚‚java(6982)
‚‚java(5715)‚‚‚java(5716)‚‚¨‚java(5717)
‚ ‚‚java(5718)
‚ ‚‚java(5719)
‚ ‚‚java(5720)
‚ ‚‚java(5721)
‚ ‚‚java(5722)
‚ ‚‚java(5723)
‚ ‚‚java(5724)
‚ ‚‚java(5725)
‚ ‚‚java(5726)
‚ ‚‚java(5727)
‚ ‚‚java(5728)
‚ ‚‚java(5729)
‚ ‚‚java(5988)
‚ ‚‚java(5990)
‚ ‚‚java(6021)
‚ ‚‚java(6023)
‚ ‚‚java(6197)
‚ ‚‚java(6213)
‚ ‚‚java(6216)
‚ ‚‚java(6217)
‚ ‚‚java(6218)
‚ ‚‚java(6219)
‚ ‚‚java(6239)
‚ ‚‚java(6266)
‚ ‚‚java(6274)
‚ ‚‚java(6278)
‚ ‚‚java(6306)
‚ ‚‚java(6435)
‚ ‚‚java(6436)
‚ ‚‚java(6437)
‚ ‚‚java(6449)
‚ ‚‚java(6450)
‚ ‚‚java(7408)
‚ ‚‚java(7409)
‚‚java(6079)‚‚‚java(6080)‚‚¨‚java(6081)
‚ ‚‚java(6082)
‚ ‚‚java(6083)
‚ ‚‚java(6084)
‚ ‚‚java(6085)
‚ ‚‚java(6086)
‚ ‚‚java(6087)
‚ ‚‚java(6088)
‚ ‚‚java(6089)
‚ ‚‚java(6090)
‚ ‚‚java(6091)
‚ ‚‚java(6092)
‚ ‚‚java(6093)
‚ ‚‚java(6109)
‚ ‚‚java(6119)
‚ ‚‚java(6208)
‚ ‚‚java(6224)
‚ ‚‚java(6279)
‚ ‚‚java(6283)
‚ ‚‚java(6290)
‚ ‚‚java(6294)
‚ ‚‚java(6295)
‚ ‚‚java(6296)
‚ ‚‚java(6297)
‚ ‚‚java(6311)
‚ ‚‚java(6312)
‚ ‚‚java(6335)
‚ ‚‚java(6341)
‚ ‚‚java(7410)
‚ ‚‚java(7411)
‚‚java(6094)‚‚‚java(6095)‚‚¨‚java(6096)
‚ ‚‚java(6097)
‚ ‚‚java(6098)
‚ ‚‚java(6099)
‚ ‚‚java(6100)
‚ ‚‚java(6101)
‚ ‚‚java(6102)
‚ ‚‚java(6103)
‚ ‚‚java(6104)
‚ ‚‚java(6105)
‚ ‚‚java(6106)
‚ ‚‚java(6107)
‚ ‚‚java(6108)
‚ ‚‚java(6128)
‚ ‚‚java(6137)
‚ ‚‚java(6249)
‚ ‚‚java(6250)
‚ ‚‚java(6308)
‚ ‚‚java(6316)
‚ ‚‚java(6330)
‚ ‚‚java(6363)
‚ ‚‚java(6369)
‚ ‚‚java(6370)
‚ ‚‚java(6373)
‚ ‚‚java(6374)
‚ ‚‚java(6375)
‚ ‚‚java(6376)
‚ ‚‚java(6381)
‚ ‚‚java(6470)
‚ ‚‚java(6482)
‚ ‚‚java(6483)
‚ ‚‚java(7002)
‚ ‚‚java(7003)
‚‚java(6110)‚‚‚java(6111)‚‚¨‚java(6112)
‚ ‚‚java(6113)
‚ ‚‚java(6114)
‚ ‚‚java(6115)
‚ ‚‚java(6116)
‚ ‚‚java(6117)
‚ ‚‚java(6118)
‚ ‚‚java(6120)
‚ ‚‚java(6121)
‚ ‚‚java(6122)
‚ ‚‚java(6123)
‚ ‚‚java(6124)
‚ ‚‚java(6125)
‚ ‚‚java(6166)
‚ ‚‚java(6167)
‚ ‚‚java(6244)
‚ ‚‚java(6245)
‚ ‚‚java(6332)
‚ ‚‚java(6334)
‚ ‚‚java(6342)
‚ ‚‚java(6351)
‚ ‚‚java(6355)
‚ ‚‚java(6356)
‚ ‚‚java(6357)
‚ ‚‚java(6358)
‚ ‚‚java(6359)
‚ ‚‚java(6360)
‚ ‚‚java(6361)
‚ ‚‚java(6362)
‚ ‚‚java(6378)
‚ ‚‚java(6471)
‚ ‚‚java(6495)
‚ ‚‚java(6496)
‚ ‚‚java(6521)
‚ ‚‚java(6524)
‚ ‚‚java(6527)
‚ ‚‚java(6533)
‚ ‚‚java(6536)
‚ ‚‚java(6539)
‚ ‚‚java(6546)
‚‚java(6127)‚‚‚java(6129)‚‚¨‚java(6130)
‚ ‚‚java(6131)
‚ ‚‚java(6132)
‚ ‚‚java(6133)
‚ ‚‚java(6134)
‚ ‚‚java(6135)
‚ ‚‚java(6136)
‚ ‚‚java(6138)
‚ ‚‚java(6139)
‚ ‚‚java(6140)
‚ ‚‚java(6141)
‚ ‚‚java(6142)
‚ ‚‚java(6143)
‚ ‚‚java(6178)
‚ ‚‚java(6181)
‚ ‚‚java(6284)
‚ ‚‚java(6285)
‚ ‚‚java(6339)
‚ ‚‚java(6348)
‚ ‚‚java(6364)
‚ ‚‚java(6379)
‚ ‚‚java(6390)
‚ ‚‚java(6396)
‚ ‚‚java(6397)
‚ ‚‚java(6398)
‚ ‚‚java(6401)
‚ ‚‚java(6402)
‚ ‚‚java(6403)
‚ ‚‚java(6404)
‚ ‚‚java(6405)
‚ ‚‚java(6455)
‚ ‚‚java(6463)
‚‚java(6147)‚‚‚java(6148)‚‚¨‚java(6149)
‚‚java(6150)
‚‚java(6151)
‚‚java(6152)
‚‚java(6153)
‚‚java(6155)
‚‚java(6156)
‚‚java(6157)
‚‚java(6158)
‚‚java(6159)
‚‚java(6160)
‚‚java(6161)
‚‚java(6162)
‚‚java(6184)
‚‚java(6185)
‚‚java(6264)
‚‚java(6267)
‚‚java(6307)
‚‚java(6315)
‚‚java(6318)
‚‚java(6319)
‚‚java(6320)
‚‚java(6324)
‚‚java(6325)
‚‚java(6326)
‚‚java(6327)
‚‚java(6344)
‚‚java(6350)
‚‚java(6454)
‚‚java(6462)
‚‚java(6466)
‚‚java(6994)
‚‚java(6995)

d2lc60(4821)

d2ls60(4962)

f60srvm(4517)‚‚‚f60webmx(9860)

httpd(4182)‚‚¨‚httpd(4204)
‚‚httpd(4206)
‚‚httpd(4223)‚‚‚httpd(4229)‚‚‚httpd(4234)
‚‚httpd(4224)‚‚‚httpd(4228)‚‚‚httpd(4233)
‚‚httpd(4225)‚‚‚httpd(4230)‚‚‚httpd(4231)
‚‚httpd(4226)‚‚‚httpd(4236)‚‚‚httpd(4237)
‚‚httpd(4227)‚‚‚httpd(4232)‚‚‚httpd(4235)
‚‚httpd(9816)‚‚‚httpd(9817)‚‚‚httpd(9818)
‚‚rotatelogs(4222)

httpd(5871)‚‚¨‚httpd(5890)
‚‚httpd(5893)‚‚¨‚java(5894)
‚ ‚‚java(5895)
‚ ‚‚java(5896)
‚‚httpd(5993)
‚‚httpd(5994)
‚‚httpd(5995)
‚‚httpd(5996)
‚‚httpd(5997)
‚‚httpd(6020)
‚‚httpd(6057)
‚‚httpd(6058)
‚‚httpd(9859)
‚‚httpd(27273)
‚‚rotatelogs(5992)

java(5080)‚‚‚java(5081)‚‚¨‚java(5082)
‚‚java(5083)
‚‚java(5084)
‚‚java(5085)
‚‚java(5086)
‚‚java(5087)
‚‚java(5088)
‚‚java(5089)
‚‚java(5090)
‚‚java(5091)
‚‚java(5092)
‚‚java(5093)
‚‚java(5094)
‚‚java(5140)
‚‚java(5141)
‚‚java(5144)
‚‚java(5174)
‚‚java(5270)
‚‚java(5271)
‚‚java(5332)
‚‚java(5337)
‚‚java(5343)
‚‚java(5347)
‚‚java(5356)
‚‚java(5357)
‚‚java(5361)

jre(5187)

oad(5131)‚‚‚dis4pr(5341)‚‚‚dis4pr(5348)‚‚¨‚dis4pr(5349)
‚‚dis4pr(5350)
‚‚dis4pr(5353)

osagent(5157)

rwmts60(4670)‚‚‚rwmts60(5108)‚‚¨‚rwmts60(5109)
‚‚rwmts60(5110)
‚‚rwmts60(5111)
‚‚rwmts60(5112)
‚‚rwmts60(5113)
‚‚rwmts60(5114)

sh(4376)‚‚‚FNDLIBR(4381)

tnslsnr(4250)

Last edited by nagavinodh; 12-01-2009 at 02:09 AM.
 
Old 12-01-2009, 02:48 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
pstree is more often used for browsing. If you really want to grep something you are probably better off using 'ps aux'.

Evo2.

PS. Have a look at the ps man page for options regarding parent processes etc.

Last edited by evo2; 12-01-2009 at 02:50 AM. Reason: Add postscript
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sshd chain is pstree output? jhwilliams Linux - Software 1 01-09-2009 08:08 AM
pstree atul_sp Linux - Server 1 07-17-2008 08:39 AM
Please translate pstree output and inform how to manipulate it Frybyte Linux - General 1 06-19-2004 10:26 PM


All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration