- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cron error about unknown terminal
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 12:06 AM
тАО05-30-2005 12:06 AM
Cron error about unknown terminal
pls help resolve this issue.
Sorry, I need to know a more specific terminal type than 'unknown'.
Rgds
Ankur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 12:21 AM
тАО05-30-2005 12:21 AM
Re: Cron error about unknown terminal
where exactly you are getting this error message? Is it in the email or in the output of cron ?
try adding 'export TERM=vt100' (basic and known to work on all machines) in your program and see whether that solves the problem.
you can also add this in crontab line.
eg:
1 * * * * export TERM=vt100; /path/to/program
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 12:22 AM
тАО05-30-2005 12:22 AM
Re: Cron error about unknown terminal
what is the cron error exactly and what cronentry is it coming from ?
i don't really understand your question.
Do you need to know some terminal types?
vt100 ,vt220 , hp
hope this helps.
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 12:37 AM
тАО05-30-2005 12:37 AM
Re: Cron error about unknown terminal
tabs
ttytype
tset
tput
clear
cron has no terminal and therefore the interactive terminal commands will report either: "not a typewriter" or "need to know a more specific terminal". It's also possible that you have a command that cannot run in batch mode, that is, it requires an interactive terminal.
In the first case (/etc/profile or .profile), you must protect the terminal-only commands by testing to see if the current environment has a real terminal attached. If not, bypass the command, something like this:
tty -s && tabs
tty -s && clear
tty -s && eval $(ttytype -s)
...etc...
Do this test for each interactive terminal command in the profiles. If you are scheduling an interactive program such as vi or an application program that requires keyboard input, this can't be done in cron because there is no terminal.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2005 05:53 PM
тАО05-31-2005 05:53 PM
Re: Cron error about unknown terminal
Actually i m writin a scritp that will tell me what caused a peak cpu or memeory utilisation.
Can anyone share a script that will do it for me.
waitin for all ur replies.
rgds
Ankur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2005 06:16 PM
тАО05-31-2005 06:16 PM
Re: Cron error about unknown terminal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2005 06:30 PM
тАО05-31-2005 06:30 PM
Re: Cron error about unknown terminal
this is the script. though incomplete.
How can i check top memory hoggin process.
set +x
DT=`date +%d%m%Y`
LFILE=Topps-$DT.log
echo "#################################################### \n " >> $LFILE
#/usr/bin/top -d1 >> $LFILE
date >> $LFILE
UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 7,7 | head >> $LFILE
/usr/bin/find /usr/scripts/ps_logs -atime -1 -name "Topps*.log" >> $LFILE
echo "\n\n#################################################### \n \n \n " >> $LFILE
thanks
Rgds
Ankur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2005 07:15 PM
тАО05-31-2005 07:15 PM
Re: Cron error about unknown terminal
Change the following line
UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 7,7 | head >> $LFILE
to
UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 6 | head >> $LFILE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 12:42 AM
тАО06-01-2005 12:42 AM
Re: Cron error about unknown terminal
The script you posted can't generate the error. Is this script run by another script? Or does the cron job perform an su? The issue is with commands run outside of your script. You can trace the script with: set -x, however, you'll need to add set -x to /etc/profile and .profile to find the error message's location.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 12:49 AM
тАО06-01-2005 12:49 AM
Re: Cron error about unknown terminal
The error you have has three possible causes.
All of them are the environment.
Bet the script runs fine from the command line.
env > /tmp/regular.env.txt
In the script add:
env > /tmp/cron.env.txt
run via cron
cd /tmp
diff cron.env.txt regular.env.txt
The answer lies here.
:-)
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 05:16 PM
тАО06-01-2005 05:16 PM
Re: Cron error about unknown terminal
Ya the env variables are different.
# diff cron.env.txt regular.env.txt
1a2,4
> MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/mx/share/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/resmon/share/man:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/graphics/common/man:/usr/dt/share/man:/opt/samba/man:/opt/gnome/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/wbem/share/man:/opt/omni/lib/man:/opt/perf/man/%L:/opt/perf/man:/opt/ssh/share/man:/opt/iexpress/tcpdump/man:/opt/iexpress/openldap/man:/opt/iexpress/sudo/man
> SHLIB_PATH=/u01_local/app/oracle/product/8.1.7/lib
> SSH_TTY=/dev/pts/2
2a6,8
> COLUMNS=142
> EDITOR=vi
> HISTFILE=/.sh_history
3a10,12
> MAIL=/var/mail/root
> ERASE
> USER=root
5a15,19
> SSH_CONNECTION=WWW.XX.XXX.XX 44029 XXX.XXX.XX.X4 22
> SSH_CLIENT=XX.WW.WW.140 44029 22
> LD_LIBRARY_PATH=/u01_local/app/oracle/product/8.1.7/lib
> TERM=xterm
> ORACLE_HOME=/u01_local/app/oracle/product/8.1.7
7a22
> LINES=51
This just a simple script cant understand why it is not working.
CRONTAB -l
0,15,30,45 * * * * /usr/scripts/ps_logs/top_ps.sh.1 > /usr/scripts/ps_logs/top_ps.sh.log
waitn.
rgds
Ankur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2005 02:09 AM
тАО06-02-2005 02:09 AM
Re: Cron error about unknown terminal
sh -x /usr/scripts/ps_logs/top_ps.sh.1
Your script is running a terminal command or program that is calling the Curses library. In the /usr/lib directory, the following string:
"Sorry, I need to know a more specific terminal type than '%s'."
exists in: libHcurses.a libHcurses.sl libcurses.0 libcurses.1
so this is the source of the error message. However, the actual command in your script (including su to a user, etc) will have to be traced as shown abaove. The set -x stays in force only for the current script. You will need to locate any sourced scripts or user switches and trace profiles.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2005 04:45 PM
тАО06-02-2005 04:45 PM
Re: Cron error about unknown terminal
Would appreciate if anyone can change this script for good.
DT=`date +%d%m%Y`
LFILE=Topps-$DT.log
echo "#################################################### \n " >> $LFILE
#/usr/bin/top -d1 >> $LFILE
date >> $LFILE
UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 7,7 | head >> $LFILE
/usr/bin/find /usr/scripts/ps_logs -atime -1 -name "Topps*.log" >> $LFILE
echo "\n\n#################################################### \n \n \n " >> $LFILE
UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 6 | head >> $LFILE
waitn for replies friends.
rgds
Ankur