LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   top in batch mode doesnt work (http://www.linuxquestions.org/questions/linux-general-1/top-in-batch-mode-doesnt-work-572162/)

alebo 07-25-2007 10:16 AM

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.:scratch:

colucix 07-25-2007 10:51 AM

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.

alebo 07-25-2007 11:32 AM

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?

colucix 07-26-2007 04:21 AM

You may have a look at
Code:

man vmstat
if available on your system.

alebo 07-27-2007 02:17 AM

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


All times are GMT -5. The time now is 11:54 AM.