LinuxQuestions.org
Review your favorite Linux distribution.
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 04-17-2015, 04:17 AM   #1
Melikins
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Rep: Reputation: Disabled
Smile Top command doesn't display properly


Hi,

I am hoping someone can help me.
When attempting to look at CPU\mem usage etc by using the 'top' command I find that it just doesn't display properly. For example:

(Btop - 10:11:40 up 9 days, 21:40, 31 users, load average: 0.22, 0.20, 0.
12(B
Tasks:(B(B 635 (Btotal,(B(B 1 (Brunning,(B(B 633 (Bsleeping,
(B(B 0 (Bstopped,(B(B 1 (Bzombie(B
Cpu(s):(B(B 6.6%(Bus,(B(B 7.1%(Bsy,(B(B 0.0%(Bni,(B(B 8
5.7%(Bid,(B(B 0.6%(Bwa,(B(B 0.0%(Bhi,(B(B 0.1%(Bsi,(B
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
(B
(B31845 lisfse 20 0 23040 7724 2444 S 7.7 0.2 0:00.36 sinfo
(BB(B 2047992k (Btotal,(B(B 371180k (Bused,(B(B 1676812k
(B18066 root 20 0 8588 2396 1484 S 5.8 0.1 5:53.44 isfic
(B
(B(B32212 lisfse 20 0 15424 1548 840 R 5.8 0.0 0:00.03 top
(B
(B18072 root 20 0 8212 1856 1364 S 3.9 0.0 3:31.54 isfic
(B
(B18065 root 20 0 8580 2392 1484 S 1.9 0.1 0:27.26 isfic



I have been able to use it before in UNIX so I know that the layout should not look like this. I'm not sure where the Bs are coming from!
Is there something I need to install or modify to get it to display in the correct format?

The OS information is as follows:

Red Hat Enterprise Linux Server release 6.4 (Santiago)
Kernel 2.6.32-358.14.1.el6.x86_64 on an x86_64

Please let me know if more information is required.

Many thanks in anticipation,

Melikins
 
Old 04-17-2015, 04:38 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
looks like a terminal issue. That means top assumes a terminal type but actually the terminal cannot handle those characters properly. What kind of terminal is it? How is your TERM variable set?
 
Old 04-17-2015, 05:01 AM   #3
Melikins
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
looks like a terminal issue. That means top assumes a terminal type but actually the terminal cannot handle those characters properly. What kind of terminal is it? How is your TERM variable set?
Thanks for your reply

I ran the echo $TERM command and the result was vt220. Unfortunately, I don't know how to find the information for the TERM variable- does the following help? This is from the .profile:

CR="unknown${TERM}"
if [ $CR = "unknown" ]
then
TERM="vt220" ; export TERM
fi

If not, could you tell me which bit to capture?

Many thanks,

Melikins
 
Old 04-17-2015, 05:24 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
What kind of terminal is it? GUI, xterm, console, whatever....
 
Old 04-17-2015, 07:18 AM   #5
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by Melikins View Post
This is from the .profile:

CR="unknown${TERM}"
if [ $CR = "unknown" ]
then
TERM="vt220" ; export TERM
fi
Generally speaking, $TERM should be set by the terminal emulator -- try commenting out those lines.
 
Old 04-17-2015, 07:29 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Just set in a VT:

Code:
export TERM=linux
Then run 'top' and see.
 
  


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
How to properly run “top” command through SSH? post98 Programming 3 05-14-2013 07:06 AM
GNOME shell doesn't display properly TomCJeagle Ubuntu 1 07-16-2010 07:23 PM
Desktop doesn't display properly via VNC sidra Linux - Software 6 05-16-2008 03:28 PM
php with css doesn't display properly htamayo Programming 3 04-15-2008 06:35 PM

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

All times are GMT -5. The time now is 11:54 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
Open Source Consulting | Domain Registration