<?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: Shutting down Interactive sessions to run database process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shutting-down-interactive-sessions-to-run-database-process/m-p/2568477#M872564</link>
    <description>Hi&lt;BR /&gt;  To kill all the user terminal you can do something like&lt;BR /&gt;&lt;BR /&gt;PIDS=`who -T | grep -v root | awk '{ print $8 }'`&lt;BR /&gt;&lt;BR /&gt;for eachProc in $PIDS;do&lt;BR /&gt;   kill -15 $eachProc&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;if you want not to kill someother users include them with grep -v options&lt;BR /&gt;like&lt;BR /&gt;who -T | grep -v root | grep -v otheruser&lt;BR /&gt;&lt;BR /&gt;...BPK...</description>
    <pubDate>Wed, 22 Aug 2001 11:49:38 GMT</pubDate>
    <dc:creator>Praveen Bezawada</dc:creator>
    <dc:date>2001-08-22T11:49:38Z</dc:date>
    <item>
      <title>Shutting down Interactive sessions to run database process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shutting-down-interactive-sessions-to-run-database-process/m-p/2568476#M872563</link>
      <description>I am looking for a way to stop all the user terminal processes so that they cannot lock up files, in order to run some unattended nightly processing.   I am running AVANTE on a Unidata database.   We run a nightly MRP process.  Often files will be locked and the nightly process blows up.   If I could come up with some way of shutting down all the interactive user sessions prior to running the nightly process, I could prevent this from happening.  I could shut down unidata, but then nothing will run (even the nightly process).  Is there something I could do with the "ps" or "kill" to stop only the user screens ?   I do have a method of shelling out to running unix commands from the AVANTE System.  I just don't know what command to run.   Any ideas welcome Thanks.</description>
      <pubDate>Wed, 22 Aug 2001 11:38:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shutting-down-interactive-sessions-to-run-database-process/m-p/2568476#M872563</guid>
      <dc:creator>Brett Penza</dc:creator>
      <dc:date>2001-08-22T11:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Shutting down Interactive sessions to run database process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shutting-down-interactive-sessions-to-run-database-process/m-p/2568477#M872564</link>
      <description>Hi&lt;BR /&gt;  To kill all the user terminal you can do something like&lt;BR /&gt;&lt;BR /&gt;PIDS=`who -T | grep -v root | awk '{ print $8 }'`&lt;BR /&gt;&lt;BR /&gt;for eachProc in $PIDS;do&lt;BR /&gt;   kill -15 $eachProc&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;if you want not to kill someother users include them with grep -v options&lt;BR /&gt;like&lt;BR /&gt;who -T | grep -v root | grep -v otheruser&lt;BR /&gt;&lt;BR /&gt;...BPK...</description>
      <pubDate>Wed, 22 Aug 2001 11:49:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shutting-down-interactive-sessions-to-run-database-process/m-p/2568477#M872564</guid>
      <dc:creator>Praveen Bezawada</dc:creator>
      <dc:date>2001-08-22T11:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Shutting down Interactive sessions to run database process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shutting-down-interactive-sessions-to-run-database-process/m-p/2568478#M872565</link>
      <description>Hi Brett&lt;BR /&gt;&lt;BR /&gt;This is somthing I do on a regular basis.&lt;BR /&gt;&lt;BR /&gt;Create a stripped down passwd, mine is called passlock and contains only root and system entries. &lt;BR /&gt;&lt;BR /&gt;Also create a user clear up script:-&lt;BR /&gt;&lt;BR /&gt;who -u | grep &lt;USERNAMES&gt; | awk '{print $7}' | xargs kill&lt;BR /&gt;&lt;BR /&gt;As my users are in groups I can pick them off by this method.&lt;BR /&gt;&lt;BR /&gt;To Zap them all then:-&lt;BR /&gt;&lt;BR /&gt;who -u | awk '{print $7}' | xargs kill&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;At routine start time :-&lt;BR /&gt;&lt;BR /&gt;cp /etc/passwd /etc/passback&lt;BR /&gt;cp /etc/passlock /etc/passwd&lt;BR /&gt;&lt;BR /&gt;The users now cannot log in.&lt;BR /&gt;&lt;BR /&gt;Run your clear users commands (as above).&lt;BR /&gt;&lt;BR /&gt;Run your process clear commands:-&lt;BR /&gt;&lt;BR /&gt;ps -ef |grep &lt;WHAT&gt; | awk '{print $2}' | xargs kill&lt;BR /&gt;&lt;BR /&gt;Then carry out your MRP process.&lt;BR /&gt;&lt;BR /&gt;When finished :-&lt;BR /&gt;&lt;BR /&gt;cp /etc/passback /etc/passwd&lt;BR /&gt;(lets the users in)&lt;BR /&gt;and restart processes.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/WHAT&gt;&lt;/USERNAMES&gt;</description>
      <pubDate>Wed, 22 Aug 2001 12:13:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shutting-down-interactive-sessions-to-run-database-process/m-p/2568478#M872565</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-08-22T12:13:30Z</dc:date>
    </item>
  </channel>
</rss>

