« Remote access via ssh with RedHat Rescue DiskHide PHP Version »

Fix strange characters from pstree on RedHat.

04/10/09

Permalink 09:39:10 am, by admin Email , 189 words   English (US)
Categories: RedHat

Fix strange characters from pstree on RedHat.

By default on Redhat, the output from pstree is scrambled like this:

initââ¬âEvMgrCâââEvMgrCâââ4*[EvMgrC]
ââatd
ââbdflush
ââcrondâââcrondâââshâââwget
ââcvdâââcvdâââ8*[cvd]
ââhttpdâââ31*[httpd]
ââirqbalance
ââkeventd
ââkhubd
ââ2*[kjournald]
ââklogd
ââkscand
ââksoftirqd/0
ââksoftirqd/1
ââksoftirqd/2
ââksoftirqd/3
ââkswapd
ââkupdated
ââmdrecoveryd
ââ6*[mingetty]
ââminiserv.pl
ââmysqld_safeâââmysqld
âânsrexecdââânsrexecd
ââportmap
ââ2*[portsentry]
âârhnsd
ââsaslauthdâââ4*[saslauthd]
ââscsi_eh_0
ââsshdâââsshdâââsshdâââbashâââsuâââbashâââpstree
ââsvscanbootââ¬âreadproctitle
â ââsvscanââ¬âsuperviseâââqmail-sendââ¬âqmail-clean
â â ââqmail-lspawn
â â ââqmail-rspawn
â ââ3*[superviseâââmultilog]
â ââsuperviseâââtcpserverâââ6*[rblsmtpdâââfixcrio]
â ââsuperviseâââtcpserver
ââsyslogd
ââvsftpd
ââxinetd

There are a couple of ways to clear this up so that it looks like this:

init─┬─EvMgrC───EvMgrC───4*[EvMgrC]
├─atd
├─bdflush
├─crond
├─cvd───cvd───8*[cvd]
├─httpd───22*[httpd]
├─irqbalance
├─keventd
├─khubd
├─2*[kjournald]
├─klogd
├─kscand
├─ksoftirqd/0
├─ksoftirqd/1
├─ksoftirqd/2
├─ksoftirqd/3
├─kswapd
├─kupdated
├─mdrecoveryd
├─6*[mingetty]
├─miniserv.pl
├─mysqld_safe───mysqld
├─nsrexecd───nsrexecd
├─portmap
├─2*[portsentry]
├─rhnsd
├─saslauthd───4*[saslauthd]
├─scsi_eh_0
├─sshd───sshd───sshd───bash───su───bash───pstree
├─svscanboot─┬─readproctitle
│ └─svscan─┬─supervise───qmail-send─┬─qmail-clean
│ │ ├─qmail-lspawn
│ │ └─qmail-rspawn
│ ├─3*[supervise───multilog]
│ ├─supervise───tcpserver───12*[rblsmtpd───fixcrio]
│ └─supervise───tcpserver
├─syslogd
├─vsftpd
└─xinetd

Here are two possible solutions:

1. Use "pstree -G" to force VT100 line drawing

2. Do "export LANG='en_US'" to change the language from UTF-8 to English

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
July 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution