LinuxQuestions.org
Visit Jeremy's Blog.
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, 05: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:

top - 10:11:40 up 9 days, 21:40, 31 users, load average: 0.22, 0.20, 0.
12
Tasks: 635 total, 1 running, 633 sleeping,
0 stopped, 1 zombie
Cpu(s): 6.6%us, 7.1%sy, 0.0%ni, 8
5.7%id, 0.6%wa, 0.0%hi, 0.1%si,
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

31845 lisfse 20 0 23040 7724 2444 S 7.7 0.2 0:00.36 sinfo
B 2047992k total, 371180k used, 1676812k
18066 root 20 0 8588 2396 1484 S 5.8 0.1 5:53.44 isfic

32212 lisfse 20 0 15424 1548 840 R 5.8 0.0 0:00.03 top

18072 root 20 0 8212 1856 1364 S 3.9 0.0 3:31.54 isfic

18065 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, 05:38 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
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, 06: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, 06:24 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
What kind of terminal is it? GUI, xterm, console, whatever....
 
Old 04-17-2015, 08:18 AM   #5
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
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, 08: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 08:06 AM
GNOME shell doesn't display properly TomCJeagle Ubuntu 1 07-16-2010 08:23 PM
Desktop doesn't display properly via VNC sidra Linux - Software 6 05-16-2008 04:28 PM
php with css doesn't display properly htamayo Programming 3 04-15-2008 07:35 PM


All times are GMT -5. The time now is 08:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration