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: |
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 |
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? |
You may have a look at
Code:
man vmstat |
Yes, vmstat together with ps and free is a good substitution.
Thank you. |
All times are GMT -5. The time now is 03:15 PM. |