Hi
I am facing a weird problem, requesting experts to give some suggestion.
If I run a script which contains command “top –n1 –b > dump_text.txt” from bash or from command prompt, it works fine. (means all "top output" is dumped to dump_text.txt file)
However, when I run the same script during "boot up of the system", I get following error
'dumb': Unknown terminal type
After `googling`,I found several threads such as
http://www.unixguide.net/linux/faq/09.02.shtml
http://www.linuxquestions.org/questi...t-work-572162/
and did the following changes
echo " Current term is $TERM"
top -b -n1
export TERM=xterm
echo " Current term is $TERM"
top -b -n1
export TERM=console
echo " Current term is $TERM"
top -b -n1
export TERM=linux
echo " Current term is $TERM"
top -b -n1
and the result was as below
'dumb': unknown terminal type.
Current term is xterm
'dumb': unknown terminal type.
Current term is console
'dumb': unknown terminal type.
Current term is linux
'dumb': unknown terminal type.
'linux': unknown terminal type.
We have "heavily" tweaked Root file system and using older version of linux kernel (2.6.18) and upgrading kernel at current stage is not feasible. Unfortunately we do not have "ps" feature either. Considering the fact that if the script works fine from shell prompt / bash, I expect it to work during boot up also (just to add, "top" binary was present at that boot stage when script was running)
Considering above constraints, any suggestion would be very helpful.
Thanks in advance