LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-25-2007, 09:16 AM   #1
alebo
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
Question top in batch mode doesnt work


I want to run top and pipe the result it to
a readable file, hance I must use it with the -b (batch)
parameter. The problem is I get this result:

'dumb': unknown terminal type.

top without -b works fine. If someone knows another way of piping top inte readble text I appreciate that as well.
 
Old 07-25-2007, 09:51 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,498

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
I would expect the opposite situation, since top looks for terminal information when launched without -b option. Anyway, the problem is not strictly related to the top command. In any case you can try to run the command by setting the TERM environment variable with env, as in
Code:
env TERM=xterm top -b
or choosing some other terminal type, depending on your OS.
 
Old 07-25-2007, 10:32 AM   #3
alebo
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
My terminal is already xterm, and I try lot of other terminals and its not working...

But by the way, I just need the cpu state total "idle" value, is there maybe some other command than top that displays that value?
 
Old 07-26-2007, 03:21 AM   #4
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,498

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
You may have a look at
Code:
man vmstat
if available on your system.
 
Old 07-27-2007, 01:17 AM   #5
alebo
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Smile

Yes, vmstat together with ps and free is a good substitution.
Thank you.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using top in batch mode neothephoenix Linux - Server 5 06-09-2007 02:21 PM
Gimp batch mode! experienced an execution error. Shioni Linux - Software 0 04-21-2006 06:41 AM
gpg in batch mode - help cricos Linux - Newbie 1 01-21-2006 08:14 PM
int 13 doesnt work after linux switch to real mode stonerudolph Linux - Software 1 08-13-2004 05:40 AM
MySQL in batch mode ganninu Linux - General 1 11-20-2003 05:49 AM


All times are GMT -5. The time now is 01:07 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration