<?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: Counting Online Oracle Users in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707399#M903586</link>
    <description>Hi Tony&lt;BR /&gt;&lt;BR /&gt;There is 64 bit binary there , but incase you want i can email you the compiled one from one of our system as an attachment . I am at msrivast@telecorp1.com .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
    <pubDate>Fri, 19 Apr 2002 20:49:52 GMT</pubDate>
    <dc:creator>MANOJ SRIVASTAVA</dc:creator>
    <dc:date>2002-04-19T20:49:52Z</dc:date>
    <item>
      <title>Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707392#M903579</link>
      <description>Is there a way using the List Open Files (LSOF) application, or any way from the HP-UX command prompt to count the number of active users connecting into an Oracle Database?</description>
      <pubDate>Fri, 19 Apr 2002 16:59:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707392#M903579</guid>
      <dc:creator>Tony Williams</dc:creator>
      <dc:date>2002-04-19T16:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707393#M903580</link>
      <description>Tony,&lt;BR /&gt;&lt;BR /&gt;At the Unix level ... Yes,&lt;BR /&gt;&lt;BR /&gt;do this:&lt;BR /&gt;&lt;BR /&gt;prompt&amp;gt;ps -ef|grep oracle&lt;BR /&gt;you will see all the oracle daemons and connections... look for the one with (LOCAL=NO ... or Description) ... those are the actual application/user connections ...then grab that particular PID and then do a:&lt;BR /&gt;&lt;BR /&gt;prompt&amp;gt; lsof -p &lt;PID&gt; | grep TCP&lt;BR /&gt;&lt;BR /&gt;you will see who is connected ...&lt;BR /&gt;&lt;BR /&gt;Hope this helps !&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shabu&lt;/PID&gt;</description>
      <pubDate>Fri, 19 Apr 2002 17:40:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707393#M903580</guid>
      <dc:creator>SHABU KHAN</dc:creator>
      <dc:date>2002-04-19T17:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707394#M903581</link>
      <description>You will do far better to write a sqlplus or svrmgrl query and examine the v$session view.&lt;BR /&gt;&lt;BR /&gt;Something like this:&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Apr 2002 17:45:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707394#M903581</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-19T17:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707395#M903582</link>
      <description>Oops, hit the button too soon.&lt;BR /&gt;&lt;BR /&gt;select unique process, osuser from v$session where osuser &amp;lt;&amp;gt; 'oracle';&lt;BR /&gt;&lt;BR /&gt;You can script this up and then call from within a shell script if you like. You should probably execute sqlpus (or svrmgrl) abd do a 'desc v$session' to see what other data you are interested in such as connections from a particular host.&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Apr 2002 17:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707395#M903582</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-19T17:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707396#M903583</link>
      <description>Thanks Shabu,&lt;BR /&gt;&lt;BR /&gt;I wonder though, doesn't Oracle pre-process a number of Oracle connections that may not necessarily have a live user connected to the port. The port is open but is there a user on it?&lt;BR /&gt;&lt;BR /&gt;Mr. Stephenson, &lt;BR /&gt;&lt;BR /&gt;This will require a bit of effort on my part, because there are several instances on my server, that I don't think anyone is using, so I would like to get rid of them. However, in order to script this out I suspect I have to log in as each individual oracle admin for that instance.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Apr 2002 20:05:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707396#M903583</guid>
      <dc:creator>Tony Williams</dc:creator>
      <dc:date>2002-04-19T20:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707397#M903584</link>
      <description>Hi Tony&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How about getting lsof itself for the box , there are binaries availabe for both 32 bit and 64 bit version of HPUX at :&lt;BR /&gt;&lt;BR /&gt;    &lt;A href="ftp://vic.cc.purdue.edu/pub/tools/unix/lsof" target="_blank"&gt;ftp://vic.cc.purdue.edu/pub/tools/unix/lsof&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;and you are good to go.&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Fri, 19 Apr 2002 20:17:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707397#M903584</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-04-19T20:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707398#M903585</link>
      <description>Thanks Manoj,&lt;BR /&gt;&lt;BR /&gt;We have lsof 4.61 loaded, but I think that is 32-bit only.</description>
      <pubDate>Fri, 19 Apr 2002 20:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707398#M903585</guid>
      <dc:creator>Tony Williams</dc:creator>
      <dc:date>2002-04-19T20:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707399#M903586</link>
      <description>Hi Tony&lt;BR /&gt;&lt;BR /&gt;There is 64 bit binary there , but incase you want i can email you the compiled one from one of our system as an attachment . I am at msrivast@telecorp1.com .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Fri, 19 Apr 2002 20:49:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707399#M903586</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-04-19T20:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707400#M903587</link>
      <description>Tony,&lt;BR /&gt;You are Welcome !&lt;BR /&gt;&lt;BR /&gt;I see what you are saying ..&lt;BR /&gt;&lt;BR /&gt;You could script this as follows:&lt;BR /&gt;&lt;BR /&gt;for PID in `ps -ef|grep oracle| awk '/LOCAL/{print $2}' | grep -v grep`&lt;BR /&gt;do&lt;BR /&gt;  lsof -p"${PID}" | grep TCP&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;You could further enhance this script with more validations ..&lt;BR /&gt;&lt;BR /&gt;Hope this helps !&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;-Shabu&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Apr 2002 22:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707400#M903587</guid>
      <dc:creator>SHABU KHAN</dc:creator>
      <dc:date>2002-04-19T22:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707401#M903588</link>
      <description>Tony,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;prompt&amp;gt;cat oracle_active_users&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;for PID in `ps -ef|grep oracle| awk '/LOCAL/{print $2}' | grep -v grep` &lt;BR /&gt;do &lt;BR /&gt;lsof -p"${PID}" | grep TCP | grep -v -i "idle"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;prompt&amp;gt;chmod 755 oracle_active_users&lt;BR /&gt;&lt;BR /&gt;prompt&amp;gt;./oracle_active_users | wc -l&lt;BR /&gt;&lt;BR /&gt;should give you the total active/established connections to your oracle&lt;BR /&gt;database. This can take very long ...&lt;BR /&gt;&lt;BR /&gt;As Clay mentioned earlier doing it at the Database level is much easier and efficient.&lt;BR /&gt;&lt;BR /&gt;Good Luck.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shabu</description>
      <pubDate>Fri, 19 Apr 2002 22:55:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707401#M903588</guid>
      <dc:creator>SHABU KHAN</dc:creator>
      <dc:date>2002-04-19T22:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Online Oracle Users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707402#M903589</link>
      <description>Hi there.&lt;BR /&gt;Why not putting Clay's idea into a little sql-script and start it from the shell using :&lt;BR /&gt;&lt;BR /&gt;su - oracle -c 'sqlplus user/passwd @user_check.sql -s&lt;BR /&gt;&lt;BR /&gt;You can start this from the cron for the different instances with the ORACLE_SID as a parameter and spool it to some temp file.&lt;BR /&gt;&lt;BR /&gt;SQL :&lt;BR /&gt;&lt;BR /&gt;set termout off&lt;BR /&gt;set feedback off&lt;BR /&gt;set pages 65&lt;BR /&gt;set lines 60&lt;BR /&gt;ttitle " Free space report "&lt;BR /&gt;column "XYZ" format a20&lt;BR /&gt;column "ABC" format 99999.99&lt;BR /&gt;select unique process, osuser from v$session where osuser &amp;lt;&amp;gt; 'oracle';&lt;BR /&gt;spool /var/tmp/usercheck&amp;amp;&amp;amp;2..lst.&amp;amp;&amp;amp;1&lt;BR /&gt;;&lt;BR /&gt;spool off&lt;BR /&gt;set termout on&lt;BR /&gt;set feedback on&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Shellscript :&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;# ==========================================================================&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;#  set -x&lt;BR /&gt;#&lt;BR /&gt;# setting the proper PATH.....&lt;BR /&gt;PATH=$PATH:/usr/local/bin&lt;BR /&gt;export PATH&lt;BR /&gt;#&lt;BR /&gt;TAG_=`date +'%y%m%d%H%M'`; export TAG_&lt;BR /&gt;#&lt;BR /&gt;# setting the Oracle environment&lt;BR /&gt;name=$1&lt;BR /&gt;&lt;BR /&gt;ORACLE_SID=${name}; export ORACLE_SID&lt;BR /&gt;ORACLE_HOME=something; export ORACLE_HOME&lt;BR /&gt;ORAENV_ASK=NO; export ORAENV_ASK&lt;BR /&gt;&lt;BR /&gt;. /usr/local/bin/oraenv&lt;BR /&gt;. /usr/local/bin/${name}.env&lt;BR /&gt;# echo $TAG_&lt;BR /&gt;echo "^L" &amp;gt;&amp;gt; /var/tmp/usercheck$ORACLE_SID.lst&lt;BR /&gt;&lt;BR /&gt;echo ${1}     &amp;gt;&amp;gt; /var/tmp/usercheck$ORACLE_SID.lst.02*&lt;BR /&gt;sqlplus system/manager @/directory/usercheck.sql $TAG_  $ORACLE_SID  -s&lt;BR /&gt;echo "          " &amp;gt;&amp;gt; /var/tmp/usercheck$ORACLE_SID.lst&lt;BR /&gt;echo "          " &amp;gt;&amp;gt; /var/tmp/usercheck$ORACLE_SID.lst&lt;BR /&gt;date  &amp;gt;&amp;gt; /var/tmp/usercheck$ORACLE_SID.lst&lt;BR /&gt;/bin/cat  /var/tmp/usercheck$ORACLE_SID.lst.02* &amp;gt;&amp;gt; /var/tmp/free$ORACLE_SID.lst&lt;BR /&gt;cat /var/tmp/usercheck$ORACLE_SID.lst.02*&lt;BR /&gt;rm /var/tmp/usercheck$ORACLE_SID.lst.02*&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Try this.&lt;BR /&gt;hope it helps&lt;BR /&gt;Rgds&lt;BR /&gt;Alexander M. Ermes</description>
      <pubDate>Sat, 20 Apr 2002 08:37:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-online-oracle-users/m-p/2707402#M903589</guid>
      <dc:creator>Alexander M. Ermes</dc:creator>
      <dc:date>2002-04-20T08:37:24Z</dc:date>
    </item>
  </channel>
</rss>

