LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Corrupted PStree result (https://www.linuxquestions.org/questions/linux-newbie-8/corrupted-pstree-result-840877/)

albertwt 10-27-2010 10:01 PM

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

Tinkster 10-27-2010 11:58 PM

What's your locale set to?

albertwt 10-28-2010 12:00 AM

thanks man, how to view that ?
I was using en-au from memory.

Tinkster 10-28-2010 12:01 AM

Just type 'locale' :} followed by enter ...

albertwt 10-28-2010 12:05 AM

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=


Tinkster 10-28-2010 12:08 AM

Just try
Code:

LANG=C pstree
... what does that do?

Tinkster 10-28-2010 12:47 AM

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

albertwt 10-28-2010 03:31 AM

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.

Tinkster 10-28-2010 11:21 AM

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?

albertwt 10-28-2010 05:30 PM

Ah....
Thanks man, I don't know why but yes it works.


All times are GMT -5. The time now is 09:35 AM.