I have a problem executing a cron process to check current CPU use in my server.
My script start with:
top -c -n 1 -u www-data > /tmp/kill-cpu
I can execute without problem in console, but in cron I get
top: failed tty get
If I use the -b option to top
top -b -n 1
'dumb': unknown terminal type.
I'm using xterm as TERM
Thanks for your help :)
SOLUTION: I was able to solve the problem with:
ln -s /lib/terminfo/d/dumb /usr/share/terminfo/d/dumb