2016年3月10日 星期四

top command in batch mode

When issue `top -b -n 1`, console showed the following message:
'dumb': unknown terminal type.
Check if the system is missing "/lib/terminfo/d/dumb" and copy it from another system.
If the error is still occurred, try `ln -s /lib/terminfo/d/dumb /usr/share/terminfo/d/dumb` and see if it helps.

The hexdump result of "dumb" (308 bytes) from Ubuntu system:

000000001A 01 18 00 02 00 01 00 82 00 08 00 64 75 6D 62|............dumb|
000000107C 38 30 2D 63 6F 6C 75 6D 6E 20 64 75 6D 62 20||80-column dumb |
0000002074 74 79 00 00 01 50 00 FF FF 00 00 02 00 FF FF|tty...P.........|
00000030FF FF FF FF FF FF FF FF FF FF FF FF FF FF 04 00|................|
00000040FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF|................|
*
00000120FF FF FF FF FF FF FF FF FF FF 06 00 07 00 0D 00|................|
000001300A 00 0A 00 |....|
00000134