<?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: script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955941#M414701</link>
    <description>Hi;&lt;BR /&gt;&lt;BR /&gt;i am trying to find some script which i can execute automatically through crontab or controlm.&lt;BR /&gt;The script should able to kill 15 days old ssh process.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Indrajit</description>
    <pubDate>Tue, 31 Jan 2006 13:57:25 GMT</pubDate>
    <dc:creator>Indrajit_1</dc:creator>
    <dc:date>2006-01-31T13:57:25Z</dc:date>
    <item>
      <title>script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955937#M414697</link>
      <description>Hi All;&lt;BR /&gt;&lt;BR /&gt;Do u have any script for killing old ssh process?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Indrajit</description>
      <pubDate>Mon, 30 Jan 2006 21:04:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955937#M414697</guid>
      <dc:creator>Indrajit_1</dc:creator>
      <dc:date>2006-01-30T21:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955938#M414698</link>
      <description>Many things to check.&lt;BR /&gt;&lt;BR /&gt;1. How do you decide "old session"&lt;BR /&gt;2. Old logins/sessions do not terminate on it's own, it could be on account ssh also. Check your ssh version and update to latest.&lt;BR /&gt;3. Check ssh config files to see if you have any option there.</description>
      <pubDate>Mon, 30 Jan 2006 21:43:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955938#M414698</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-01-30T21:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955939#M414699</link>
      <description>Get ssh process as,&lt;BR /&gt;&lt;BR /&gt;# ps -ef | grep ssh &lt;BR /&gt;&lt;BR /&gt;kill them with kill command.&lt;BR /&gt;&lt;BR /&gt;Or simply as,&lt;BR /&gt;&lt;BR /&gt;# kill -9 `ps -ef | grep ssh | awk '{ print $2 }'`&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Muthu</description>
      <pubDate>Tue, 31 Jan 2006 00:14:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955939#M414699</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-01-31T00:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955940#M414700</link>
      <description>Hello, &lt;BR /&gt;&lt;BR /&gt;You can stop all SSH process by, &lt;BR /&gt;&lt;BR /&gt;#/sbin/init.d/secsh stop &lt;BR /&gt;&lt;BR /&gt;or simply by, &lt;BR /&gt;&lt;BR /&gt;# kill -9 `ps -ae |grep -i ssh |awk '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Tue, 31 Jan 2006 00:19:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955940#M414700</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-01-31T00:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955941#M414701</link>
      <description>Hi;&lt;BR /&gt;&lt;BR /&gt;i am trying to find some script which i can execute automatically through crontab or controlm.&lt;BR /&gt;The script should able to kill 15 days old ssh process.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Indrajit</description>
      <pubDate>Tue, 31 Jan 2006 13:57:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955941#M414701</guid>
      <dc:creator>Indrajit_1</dc:creator>
      <dc:date>2006-01-31T13:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955942#M414702</link>
      <description>Hi Indrajit:&lt;BR /&gt;&lt;BR /&gt;This gets greatly simplified if you leverage the UNIX95 (XPG4) mode of 'ps'.&lt;BR /&gt;&lt;BR /&gt;For instance, if you wanted to discriminate "too long" on the elapsed time of a process, use 'etime':&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -C init -o pid= -o comm= -o etime=&lt;BR /&gt;&lt;BR /&gt;This would return the 'pid', the 'comm'and name (basename) and the elapsed time of a process named by '-C' in this example, 'init'.&lt;BR /&gt;&lt;BR /&gt;The value here is several fold.  Using the '-C name' selects *only* processes matching 'name'.  A grep for a name "tar" would also find processes named "start" -- probably not what you want!&lt;BR /&gt;&lt;BR /&gt;The next value of the UNIX95 mode is that times, like the 'etime' are formatted in days, hours, minutes and seconds, like:&lt;BR /&gt;&lt;BR /&gt;79-09:35:22&lt;BR /&gt;&lt;BR /&gt;...for 79-days, 9-hours, 35-minutes and 22-seconds.  This makes comparisons like greater than 15-days simple.&lt;BR /&gt;&lt;BR /&gt;This should get you on the right path.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 31 Jan 2006 14:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955942#M414702</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-01-31T14:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955943#M414703</link>
      <description>Hi All;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for ur kind support. i will try to write a script which may help me to kill old ssh process in an specific interval of time.&lt;BR /&gt;&lt;BR /&gt;Thanks to James. i think ur input would help me to resolve my issue.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Indrajit</description>
      <pubDate>Tue, 31 Jan 2006 20:55:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4955943#M414703</guid>
      <dc:creator>Indrajit_1</dc:creator>
      <dc:date>2006-01-31T20:55:31Z</dc:date>
    </item>
  </channel>
</rss>

