LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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 CentOS
Posts: 6,726

Rep: Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:37 AM.

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
Open Source Consulting | Domain Registration