<?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: Shell timeout in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863126#M865215</link>
    <description>Hi,&lt;BR /&gt;As said in my previous post since your main shell has called a menu the TMOUT will not apply because its not "idle" anymore so as Anil suggest your only solution is to look through who -HT that shows tty idle and not shell idle...&lt;BR /&gt;&lt;BR /&gt;I have a case here at work:&lt;BR /&gt;# who -HT&lt;BR /&gt;NAME       LINE         TIME          IDLE    PID  COMMENTS&lt;BR /&gt;vbe      - ttyp1        Sep 27 20:30  old   24719  &lt;BR /&gt;vbe      - ttyp2        Sep 27 20:30   .    24734  &lt;BR /&gt;vbe      - ttyp3        Sep 27 20:30  old   24752  &lt;BR /&gt;oper     + ttyr2        Sep 29 12:18  4:52  22237  &lt;BR /&gt;tollerju + pty/ttys6    Sep 29 10:49  1:34  17083  &lt;BR /&gt;oper     + pty/ttysb    Sep 29 08:25  5:50  16220  &lt;BR /&gt;porteni  + pty/ttyt7    Sep 29 08:49  7:37   8103  &lt;BR /&gt;rolohugo + pty/ttyt8    Sep 27 08:38  old    5065  &lt;BR /&gt;revazgil + pty/ttyu3    Sep 29 08:46  0:55   5446  &lt;BR /&gt;tounsifa + pty/ttyu7    Sep 29 08:49  2:09   8385  &lt;BR /&gt;revazgil + pty/ttyv4    Sep 29 09:11  2:11  24022 &lt;BR /&gt;# ps -ef |grep toller&lt;BR /&gt;     vbe  9539 24734  1 18:24:45 ttyp2     0:00 grep toller&lt;BR /&gt;tollerju 17083 17082  0 10:49:31 ttys6     0:01 /opt/oracle/product/7.2.3/bin/iap30 -c /opt/oracle&lt;BR /&gt;/product/7&lt;BR /&gt;tollerju 17425 17083  0 10:49:40 ?         0:14 oraclePXPX (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTO&lt;BR /&gt;COL=beq)))&lt;BR /&gt;#&lt;BR /&gt;# finger tollerju&lt;BR /&gt;Login name: tollerju    (messages off)  In real life: TOLLER Juliana&lt;BR /&gt;Bldg: 123&lt;BR /&gt;Directory: /users/ocpa/tollerju         Shell: /usr/bin/sh&lt;BR /&gt;On since Sep 29 10:49:37 on pty/ttys6 from 160.53.84.208&lt;BR /&gt;1 hour 37 minutes Idle Time&lt;BR /&gt;No Plan.&lt;BR /&gt;&lt;BR /&gt;I know that when these people connect themselves they launch a shell that calls a menu that calls a Forms3 menu...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor</description>
    <pubDate>Wed, 29 Sep 2004 11:29:41 GMT</pubDate>
    <dc:creator>Victor BERRIDGE</dc:creator>
    <dc:date>2004-09-29T11:29:41Z</dc:date>
    <item>
      <title>Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863118#M865207</link>
      <description>Hi! all,&lt;BR /&gt;&lt;BR /&gt;All the users use ksh in our HPUX 11i system. The .profile of all the users call another script in this form ". /usr/local/bin/abc" which has a "while true" loop so that the users will only get a menu when they login and when they exit the menu they will be logged out of the system. It has to be that way.&lt;BR /&gt;&lt;BR /&gt;My question is how do I setup a shell timeout or idle timeout of say 30mts?&lt;BR /&gt;&lt;BR /&gt;When I comment the script entry in the .profile and set the TMOUT value in the .profile. It works just fine as desired. But with the script entry enabled the TMOUT has no significance. The same happens when I set the TMOUT in /etc/profile.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;&lt;BR /&gt;-Venkat</description>
      <pubDate>Wed, 29 Sep 2004 10:34:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863118#M865207</guid>
      <dc:creator>Venkat Bala_2</dc:creator>
      <dc:date>2004-09-29T10:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863119#M865208</link>
      <description>You would be better off checking the login every 30 mins and checking the user's idle time (who -HT) and logging him out if it is more then 30 mins.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 29 Sep 2004 10:39:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863119#M865208</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-09-29T10:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863120#M865209</link>
      <description>Naturally it has to be entered after the PS1 shell variable. &lt;BR /&gt;&lt;BR /&gt;Also if you want telnet to timeout, you can use inetd.conf &lt;BR /&gt;&lt;BR /&gt;telnetd -n240 like that. &lt;BR /&gt;&lt;BR /&gt;Check your abc script, and you may put the value in abc script itslelf. &lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;DO PS1=" &amp;lt;&amp;gt;" &lt;BR /&gt;and then do &lt;BR /&gt;TMOUT=90&lt;BR /&gt;and afterwards&lt;BR /&gt;call the script&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;Prashant</description>
      <pubDate>Wed, 29 Sep 2004 10:42:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863120#M865209</guid>
      <dc:creator>Prashant Zanwar_4</dc:creator>
      <dc:date>2004-09-29T10:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863121#M865210</link>
      <description>Hi,&lt;BR /&gt;Anil's suggestion is the way to go for TMOUT works for shell inactivity which is not your case (stuck in a menu)&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor</description>
      <pubDate>Wed, 29 Sep 2004 10:51:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863121#M865210</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2004-09-29T10:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863122#M865211</link>
      <description>Venkat,&lt;BR /&gt;&lt;BR /&gt;I checked my reply and thought over it. If the abc script uses, while loop and comes tru all the time, even (who -HT) will not work because, the terminal is not idle. It is doing something. You script should take of these things. &lt;BR /&gt;&lt;BR /&gt;I tried simple thing. Opened a vi session and waited. The idle time (who -HT&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 29 Sep 2004 11:02:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863122#M865211</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-09-29T11:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863123#M865212</link>
      <description>Hi! again,&lt;BR /&gt;&lt;BR /&gt;Prashant, I should have mentioned this in my first query but anyway, I had tried the option that you suggested PS1="XYZ" and then export TMOUT=30 in the abc script prior to asking this question in this forum. It didn't help. I even tried putting the TMOUT within the "while true" loop but didn't help. The inted parameter you talked about is not what I need.&lt;BR /&gt;&lt;BR /&gt;Anil, I guess you already said what I was about to say for your response.&lt;BR /&gt;&lt;BR /&gt;Any more ideas/thoughts?????&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;&lt;BR /&gt;-Venkat&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Sep 2004 11:11:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863123#M865212</guid>
      <dc:creator>Venkat Bala_2</dc:creator>
      <dc:date>2004-09-29T11:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863124#M865213</link>
      <description>I just tried running the while true on a terminal. I tried&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;bdf .&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;And watched the tty. Yes, it gives you idle time in who -HT. I am not sure about what idle time this refers to??--may be terminal activity. You can user who -HT in your case.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 29 Sep 2004 11:17:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863124#M865213</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-09-29T11:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863125#M865214</link>
      <description>The TMOUT variable will do you absolutely no good here.  The TMOUT variable only works if the user is sitting at a shell prompt (like the $ prompt).  Once a program or script is invoked, the TMOUT variable is essentially nullified.  The reason being, in my opinion, that you wouldn't want to kill a session while it is doing something.  Once you have invoked a script or program there is really no way for the parent process (the -ksh process in your case) to know what its child process(es) are doing.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Sep 2004 11:25:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863125#M865214</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-09-29T11:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863126#M865215</link>
      <description>Hi,&lt;BR /&gt;As said in my previous post since your main shell has called a menu the TMOUT will not apply because its not "idle" anymore so as Anil suggest your only solution is to look through who -HT that shows tty idle and not shell idle...&lt;BR /&gt;&lt;BR /&gt;I have a case here at work:&lt;BR /&gt;# who -HT&lt;BR /&gt;NAME       LINE         TIME          IDLE    PID  COMMENTS&lt;BR /&gt;vbe      - ttyp1        Sep 27 20:30  old   24719  &lt;BR /&gt;vbe      - ttyp2        Sep 27 20:30   .    24734  &lt;BR /&gt;vbe      - ttyp3        Sep 27 20:30  old   24752  &lt;BR /&gt;oper     + ttyr2        Sep 29 12:18  4:52  22237  &lt;BR /&gt;tollerju + pty/ttys6    Sep 29 10:49  1:34  17083  &lt;BR /&gt;oper     + pty/ttysb    Sep 29 08:25  5:50  16220  &lt;BR /&gt;porteni  + pty/ttyt7    Sep 29 08:49  7:37   8103  &lt;BR /&gt;rolohugo + pty/ttyt8    Sep 27 08:38  old    5065  &lt;BR /&gt;revazgil + pty/ttyu3    Sep 29 08:46  0:55   5446  &lt;BR /&gt;tounsifa + pty/ttyu7    Sep 29 08:49  2:09   8385  &lt;BR /&gt;revazgil + pty/ttyv4    Sep 29 09:11  2:11  24022 &lt;BR /&gt;# ps -ef |grep toller&lt;BR /&gt;     vbe  9539 24734  1 18:24:45 ttyp2     0:00 grep toller&lt;BR /&gt;tollerju 17083 17082  0 10:49:31 ttys6     0:01 /opt/oracle/product/7.2.3/bin/iap30 -c /opt/oracle&lt;BR /&gt;/product/7&lt;BR /&gt;tollerju 17425 17083  0 10:49:40 ?         0:14 oraclePXPX (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTO&lt;BR /&gt;COL=beq)))&lt;BR /&gt;#&lt;BR /&gt;# finger tollerju&lt;BR /&gt;Login name: tollerju    (messages off)  In real life: TOLLER Juliana&lt;BR /&gt;Bldg: 123&lt;BR /&gt;Directory: /users/ocpa/tollerju         Shell: /usr/bin/sh&lt;BR /&gt;On since Sep 29 10:49:37 on pty/ttys6 from 160.53.84.208&lt;BR /&gt;1 hour 37 minutes Idle Time&lt;BR /&gt;No Plan.&lt;BR /&gt;&lt;BR /&gt;I know that when these people connect themselves they launch a shell that calls a menu that calls a Forms3 menu...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor</description>
      <pubDate>Wed, 29 Sep 2004 11:29:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863126#M865215</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2004-09-29T11:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863127#M865216</link>
      <description>Two ideas...&lt;BR /&gt;1.  Run a regular cron job to identify and kill any terminal sessions that have been inactive for &amp;gt; 30 mins. The 'w' command displays terminal idle time in minutes and seconds.&lt;BR /&gt;&lt;BR /&gt;2. Have a background process monitor the menu process. The menu can't do anything because it's sitting on a 'read' statement waiting for terminal input.&lt;BR /&gt;Just prior to the 'read' run a background script which sleeps for 30 minutes then kills its parent.&lt;BR /&gt;If the menu is reactivated by the user typing an option, kill the background script.&lt;BR /&gt;&lt;BR /&gt;The first option is probably easier to implement.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Wed, 29 Sep 2004 11:30:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863127#M865216</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2004-09-29T11:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863128#M865217</link>
      <description>We are having only one option as checking the idleness of shell login there.&lt;BR /&gt;&lt;BR /&gt; I have tested by putting infinite loop on /etc/profile and .profile and idleness are logged on who and w commands.&lt;BR /&gt;&lt;BR /&gt; If we start a process ( infinite loop ) on /etc/profile or .profile so that specific shell process can be controlled in another terminal of same user or super user to manage that particular process. &lt;BR /&gt; &lt;BR /&gt; Because we can not start that specific process in background so that user can not do operation on menu's. IT can be done on foreground only.&lt;BR /&gt;&lt;BR /&gt; Get the idleness of shell as,&lt;BR /&gt; &lt;BR /&gt; who -Ru or who -HT&lt;BR /&gt; or&lt;BR /&gt; w command or w -h&lt;BR /&gt;&lt;BR /&gt; Write a script and do cron it so that it will run for every one minute to check idleness of shell process and kill that shell process with some message to that user usign wall command with tty ( can get with who or w ).&lt;BR /&gt;&lt;BR /&gt; Or run manual mode to check that with shell script.&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Sep 2004 12:01:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863128#M865217</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-29T12:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863129#M865218</link>
      <description>Thank you everyone for your replies. I thought I would check the forum techies before I came to the conclusion that I've write a shell script and run a cron job every minute.&lt;BR /&gt;&lt;BR /&gt;I guess that seems to be the only option.&lt;BR /&gt;&lt;BR /&gt;-Venkat</description>
      <pubDate>Wed, 29 Sep 2004 12:59:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863129#M865218</guid>
      <dc:creator>Venkat Bala_2</dc:creator>
      <dc:date>2004-09-29T12:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Shell timeout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863130#M865219</link>
      <description>I'll write a shell script and setup a cron job every minute.&lt;BR /&gt;&lt;BR /&gt;Thank you everyone for your time and inputs.&lt;BR /&gt;&lt;BR /&gt;-Venkat</description>
      <pubDate>Wed, 29 Sep 2004 13:01:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-timeout/m-p/4863130#M865219</guid>
      <dc:creator>Venkat Bala_2</dc:creator>
      <dc:date>2004-09-29T13:01:25Z</dc:date>
    </item>
  </channel>
</rss>

