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 10-27-2010, 11:01 PM   #1
albertwt
Member
 
Registered: Aug 2010
Posts: 50

Rep: Reputation: 1
Question Corrupted PStree result


Hi All,

May I know why when i type pstree, the result is garbled like the following:

Code:
root@SSV:/home/administrator/jira# pstree
init‚‚¨‚atd
     ‚‚cron
     ‚‚dhclient3
     ‚‚5*[getty]
     ‚‚login‚‚‚bash
     ‚‚rsyslogd‚‚‚2*[{rsyslogd}]
     ‚‚sshd‚‚¨‚sshd‚‚‚sshd‚‚‚bash‚‚‚su‚‚‚bash‚‚‚pstree
     ‚      ‚‚sshd‚‚‚sshd‚‚‚sftp-server
     ‚‚udevd‚‚‚2*[udevd]
     ‚‚upstart-udev-br
     ‚‚vmware-guestd
is there anything that i can do about it ?

Thanks
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-28-2010, 12:58 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
What's your locale set to?
 
1 members found this post helpful.
Old 10-28-2010, 01:00 AM   #3
albertwt
Member
 
Registered: Aug 2010
Posts: 50

Original Poster
Rep: Reputation: 1
thanks man, how to view that ?
I was using en-au from memory.
 
Old 10-28-2010, 01:01 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Just type 'locale' :} followed by enter ...
 
2 members found this post helpful.
Old 10-28-2010, 01:05 AM   #5
albertwt
Member
 
Registered: Aug 2010
Posts: 50

Original Poster
Rep: Reputation: 1
here's the result:


Quote:
root@SSV:/home/administrator/# locale
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
 
Old 10-28-2010, 01:08 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Just try
Code:
LANG=C pstree
... what does that do?
 
2 members found this post helpful.
Old 10-28-2010, 01:47 AM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
And ... ?

Few more questions: which distro are you using? is pstree aliased to something?

I can force the "funny" result on my machine with the -U switch; you may want
to play with -A or -G respectively. Personally I like the -G output best, and
-A is what my pstree defaults to.


Cheers,
Tink
 
1 members found this post helpful.
Old 10-28-2010, 04:31 AM   #8
albertwt
Member
 
Registered: Aug 2010
Posts: 50

Original Poster
Rep: Reputation: 1
Hi Tinkster, I'm using Ubuntu Server 10.0.04.1 LTS

yes it works man:

Quote:
root@SSV:/home/administrator# LANG=C pstree
init-+-atd
|-cron
|-dhclient3
|-5*[getty]
|-login---bash
|-rsyslogd---2*[{rsyslogd}]
|-sshd-+-sshd---sshd---bash---su---bash---pstree
| `-sshd---sshd---sftp-server
|-udevd---2*[udevd]
|-upstart-udev-br
`-vmware-guestd


root@SSV:/home/administrator# pstree
init‚‚¨‚atd
‚‚cron
‚‚dhclient3
‚‚5*[getty]
‚‚login‚‚‚bash
‚‚rsyslogd‚‚‚2*[{rsyslogd}]
‚‚sshd‚‚¨‚sshd‚‚‚sshd‚‚‚bash‚‚‚su‚‚‚bash‚‚‚pstree
‚ ‚‚sshd‚‚‚sshd‚‚‚sftp-server
‚‚udevd‚‚‚2*[udevd]
‚‚upstart-udev-br
‚‚vmware-guestd
root@SSV:/home/administrator/jira#
but why Do i have to use Lang=C ?

Thanks man for the correct direction.
 
Old 10-28-2010, 12:21 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I can't answer the "why", sorry. My Slackware installations give
the same result w/ UTF-8 and C language settings. Have you tried
the command line switches mentioned in my other post?
 
1 members found this post helpful.
Old 10-28-2010, 06:30 PM   #10
albertwt
Member
 
Registered: Aug 2010
Posts: 50

Original Poster
Rep: Reputation: 1
Ah....
Thanks man, I don't know why but yes it works.
 
  


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
[SOLVED] question about pstree :) Sayan Acharjee Linux - General 2 03-17-2010 11:50 PM
pstree nagavinodh Linux - Newbie 3 12-01-2009 02:48 AM
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:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration