<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cron error about unknown terminal in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554285#M225519</link>
    <description>thanks everybody.But i still get that error by mail.&lt;BR /&gt;Actually i m writin a scritp that will tell me what caused a peak cpu or memeory utilisation.&lt;BR /&gt;Can anyone share a script that will do it for me.&lt;BR /&gt;waitin for all ur replies.&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Ankur&lt;BR /&gt;</description>
    <pubDate>Wed, 01 Jun 2005 00:53:22 GMT</pubDate>
    <dc:creator>ankurp</dc:creator>
    <dc:date>2005-06-01T00:53:22Z</dc:date>
    <item>
      <title>Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554281#M225515</link>
      <description>HI ,&lt;BR /&gt;pls help resolve this issue.&lt;BR /&gt;&lt;BR /&gt;Sorry, I need to know a more specific terminal type than 'unknown'.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Ankur</description>
      <pubDate>Mon, 30 May 2005 07:06:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554281#M225515</guid>
      <dc:creator>ankurp</dc:creator>
      <dc:date>2005-05-30T07:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554282#M225516</link>
      <description>&lt;BR /&gt;where exactly you are getting this error message? Is it in the email or in the output of cron ?&lt;BR /&gt;&lt;BR /&gt;try adding 'export TERM=vt100' (basic and known to work on all machines) in your program and see whether that solves the problem. &lt;BR /&gt;&lt;BR /&gt;you can also add this in crontab line.&lt;BR /&gt;&lt;BR /&gt;eg:&lt;BR /&gt;1 * * * * export TERM=vt100; /path/to/program&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gopi&lt;BR /&gt;</description>
      <pubDate>Mon, 30 May 2005 07:21:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554282#M225516</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-05-30T07:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554283#M225517</link>
      <description>hi ankurp &lt;BR /&gt;&lt;BR /&gt;what is the cron error exactly and what cronentry is it coming from ?&lt;BR /&gt;&lt;BR /&gt;i don't really understand your question. &lt;BR /&gt;Do you need to know some terminal types? &lt;BR /&gt;vt100 ,vt220 , hp&lt;BR /&gt;&lt;BR /&gt;hope this helps.&lt;BR /&gt;regards&lt;BR /&gt;</description>
      <pubDate>Mon, 30 May 2005 07:22:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554283#M225517</guid>
      <dc:creator>Henk Geurts</dc:creator>
      <dc:date>2005-05-30T07:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554284#M225518</link>
      <description>Your cron job is either running as another user by logging in using su - some_user, or you have a command or script that requires a terminal and keyboard. Normally, cron never logs in, but with su -, /etc/profile and then $HOME/some_user/.profile is run and one (or both) of these profiles contains terminal-only commands such as:&lt;BR /&gt; &lt;BR /&gt;tabs&lt;BR /&gt;ttytype&lt;BR /&gt;tset&lt;BR /&gt;tput&lt;BR /&gt;clear&lt;BR /&gt; &lt;BR /&gt;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.&lt;BR /&gt; &lt;BR /&gt;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:&lt;BR /&gt; &lt;BR /&gt;tty -s &amp;amp;&amp;amp; tabs&lt;BR /&gt;tty -s &amp;amp;&amp;amp; clear&lt;BR /&gt;tty -s &amp;amp;&amp;amp; eval $(ttytype -s)&lt;BR /&gt;...etc...&lt;BR /&gt; &lt;BR /&gt;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.</description>
      <pubDate>Mon, 30 May 2005 07:37:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554284#M225518</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-05-30T07:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554285#M225519</link>
      <description>thanks everybody.But i still get that error by mail.&lt;BR /&gt;Actually i m writin a scritp that will tell me what caused a peak cpu or memeory utilisation.&lt;BR /&gt;Can anyone share a script that will do it for me.&lt;BR /&gt;waitin for all ur replies.&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Ankur&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Jun 2005 00:53:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554285#M225519</guid>
      <dc:creator>ankurp</dc:creator>
      <dc:date>2005-06-01T00:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554286#M225520</link>
      <description>What command are you running in your cron job? If it's 'top' try running it with -f &lt;FILENAME&gt;  option. This will redirect its output to a file and it won't complain about the terminal type.&lt;/FILENAME&gt;</description>
      <pubDate>Wed, 01 Jun 2005 01:16:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554286#M225520</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-06-01T01:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554287#M225521</link>
      <description>hi ,&lt;BR /&gt;this is the script. though incomplete.&lt;BR /&gt;How can i check top memory hoggin process.&lt;BR /&gt;&lt;BR /&gt;set +x&lt;BR /&gt;&lt;BR /&gt;DT=`date +%d%m%Y`&lt;BR /&gt;LFILE=Topps-$DT.log&lt;BR /&gt;echo "#################################################### \n " &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;#/usr/bin/top -d1  &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;date &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 7,7 | head &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;/usr/bin/find /usr/scripts/ps_logs  -atime -1 -name  "Topps*.log"  &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;echo "\n\n#################################################### \n \n \n "  &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Ankur</description>
      <pubDate>Wed, 01 Jun 2005 01:30:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554287#M225521</guid>
      <dc:creator>ankurp</dc:creator>
      <dc:date>2005-06-01T01:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554288#M225522</link>
      <description>ps line will do but you are sorting on the wrong field (7 instead of 6).&lt;BR /&gt;&lt;BR /&gt;Change the following line&lt;BR /&gt;&lt;BR /&gt;UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 7,7 | head &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 6 | head &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Jun 2005 02:15:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554288#M225522</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-06-01T02:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554289#M225523</link>
      <description>&amp;gt; thanks everybody.But i still get that error by mail.&lt;BR /&gt; &lt;BR /&gt;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.</description>
      <pubDate>Wed, 01 Jun 2005 07:42:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554289#M225523</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-06-01T07:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554290#M225524</link>
      <description>If you set TERM and aforementioned variable the script above will not continue to produce the error.&lt;BR /&gt;&lt;BR /&gt;The error you have has three possible causes.&lt;BR /&gt;&lt;BR /&gt;All of them are the environment.&lt;BR /&gt;&lt;BR /&gt;Bet the script runs fine from the command line.&lt;BR /&gt;&lt;BR /&gt;env &amp;gt; /tmp/regular.env.txt&lt;BR /&gt;&lt;BR /&gt;In the script add:&lt;BR /&gt;&lt;BR /&gt;env &amp;gt; /tmp/cron.env.txt&lt;BR /&gt;&lt;BR /&gt;run via cron&lt;BR /&gt;&lt;BR /&gt;cd /tmp&lt;BR /&gt;&lt;BR /&gt;diff cron.env.txt regular.env.txt&lt;BR /&gt;&lt;BR /&gt;The answer lies here.&lt;BR /&gt;&lt;BR /&gt;:-)&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 01 Jun 2005 07:49:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554290#M225524</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-06-01T07:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554291#M225525</link>
      <description>no luck still,&lt;BR /&gt;Ya the env variables are different.&lt;BR /&gt;&lt;BR /&gt; # diff cron.env.txt regular.env.txt&lt;BR /&gt;1a2,4&lt;BR /&gt;&amp;gt; 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&lt;BR /&gt;&amp;gt; SHLIB_PATH=/u01_local/app/oracle/product/8.1.7/lib&lt;BR /&gt;&amp;gt; SSH_TTY=/dev/pts/2&lt;BR /&gt;2a6,8&lt;BR /&gt;&amp;gt; COLUMNS=142&lt;BR /&gt;&amp;gt; EDITOR=vi&lt;BR /&gt;&amp;gt; HISTFILE=/.sh_history&lt;BR /&gt;3a10,12&lt;BR /&gt;&amp;gt; MAIL=/var/mail/root&lt;BR /&gt;&amp;gt; ERASE&lt;BR /&gt;&amp;gt; USER=root&lt;BR /&gt;5a15,19&lt;BR /&gt;&amp;gt; SSH_CONNECTION=&lt;A href="http://WWW.XX.XXX.XX" target="_blank"&gt;WWW.XX.XXX.XX&lt;/A&gt; 44029 XXX.XXX.XX.X4 22&lt;BR /&gt;&amp;gt; SSH_CLIENT=XX.WW.WW.140 44029 22&lt;BR /&gt;&amp;gt; LD_LIBRARY_PATH=/u01_local/app/oracle/product/8.1.7/lib&lt;BR /&gt;&amp;gt; TERM=xterm&lt;BR /&gt;&amp;gt; ORACLE_HOME=/u01_local/app/oracle/product/8.1.7&lt;BR /&gt;7a22&lt;BR /&gt;&amp;gt; LINES=51&lt;BR /&gt;&lt;BR /&gt;This just a simple script cant understand why it is not working.&lt;BR /&gt;&lt;BR /&gt;CRONTAB -l&lt;BR /&gt;&lt;BR /&gt;0,15,30,45  * * * * /usr/scripts/ps_logs/top_ps.sh.1  &amp;gt; /usr/scripts/ps_logs/top_ps.sh.log&lt;BR /&gt;&lt;BR /&gt;waitn.&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Ankur</description>
      <pubDate>Thu, 02 Jun 2005 00:16:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554291#M225525</guid>
      <dc:creator>ankurp</dc:creator>
      <dc:date>2005-06-02T00:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554292#M225526</link>
      <description>Can you post the output of this:&lt;BR /&gt; &lt;BR /&gt;sh -x /usr/scripts/ps_logs/top_ps.sh.1&lt;BR /&gt; &lt;BR /&gt;Your script is running a terminal command or program that is calling the Curses library. In the /usr/lib directory, the following string:&lt;BR /&gt; &lt;BR /&gt;"Sorry, I need to know a more specific terminal type than '%s'."&lt;BR /&gt; &lt;BR /&gt;exists in: libHcurses.a libHcurses.sl libcurses.0 libcurses.1&lt;BR /&gt; &lt;BR /&gt;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.</description>
      <pubDate>Thu, 02 Jun 2005 09:09:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554292#M225526</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-06-02T09:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cron error about unknown terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554293#M225527</link>
      <description>thanks , this is the script.&lt;BR /&gt;Would appreciate if anyone can change this script for good.&lt;BR /&gt;&lt;BR /&gt;DT=`date +%d%m%Y`&lt;BR /&gt;LFILE=Topps-$DT.log&lt;BR /&gt;echo "#################################################### \n " &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;#/usr/bin/top -d1  &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;date &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 7,7 | head &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;/usr/bin/find /usr/scripts/ps_logs  -atime -1 -name  "Topps*.log"  &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;echo "\n\n#################################################### \n \n \n "  &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;UNIX95= /usr/bin/ps -eo sid,pid,ppid,ruser,user,vsz,pcpu,state,args | sort -rn -k 6 | head &amp;gt;&amp;gt; $LFILE&lt;BR /&gt;&lt;BR /&gt;waitn for replies friends.&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Ankur</description>
      <pubDate>Thu, 02 Jun 2005 23:45:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-error-about-unknown-terminal/m-p/3554293#M225527</guid>
      <dc:creator>ankurp</dc:creator>
      <dc:date>2005-06-02T23:45:31Z</dc:date>
    </item>
  </channel>
</rss>

