Home » RDBMS Server » Performance Tuning » Count oracle user process
Count oracle user process [message #115970] Fri, 15 April 2005 11:09 Go to next message
ntnboi
Messages: 17
Registered: April 2005
Location: Italy - Rome
Junior Member

Hi,
I have the follow scenario:

SO: unix sun solaris 8
RDBMS: oracle 9.2.0.6

I have make a script that run by unix command line (ksh) to check the number of user process active to DB
example:

server1@oracle: ps -ef| grep oracleISTANCE_NAME

result: null

but in other server with version of RDBMS 9.0.1 the command work correctly

server2@oracle: ps -ef| grep oracleIST_NAME

oracle 2498 1 1 16:54:19 ? 0:01 oracleIST_NAME (LOCAL=NO)
oracle 239 1 0 13:42:05 ? 0:36 oracleIST_NAME (LOCAL=NO)
oracle 827 1 0 14:36:20 ? 0:27 oracleIST_NAME (LOCAL=NO)
oracle 2496 1 0 16:53:58 ? 0:00 oracleIST_NAME (LOCAL=NO)
oracle 286 1 0 13:47:47 ? 0:31 oracleIST_NAME (LOCAL=NO)
oracle 2491 1 0 16:53:16 ? 0:00 oracleIST_NAME (LOCAL=NO)

Do you know a command or instruction (via OS) to check active user process generated by a connection for a 9.2.0.6 RDBMS?

Re: Count oracle user process [message #116261 is a reply to message #115970] Mon, 18 April 2005 22:50 Go to previous messageGo to next message
chunyuh
Messages: 13
Registered: April 2005
Junior Member

Won't it be better ?

SQL>select count(*) from v$session where type='USER';

If you insist on OS command, ps is fine. Just pay attention that some parameters of ps has different meaning on different flavor of Unix. Just check manual for ps on your own Unix.


Chunyu Hu
http://mtsmart.kmip.net
Re: Count oracle user process [message #116338 is a reply to message #116261] Tue, 19 April 2005 09:29 Go to previous messageGo to next message
pscjhe
Messages: 38
Registered: April 2005
Member
using OS "PS" is even INCORRECT in the case of Oracle Shared Server (or MTS ) let alone different flavor of unix will have different process naming conventions and different "ps" command format.

For Windows, you can't use ps to find those background processes, because it is single process but multi-threaded.

I like the term "User sessions" better than "User processes" for above reasons.
Re: Count oracle user process [message #116491 is a reply to message #116338] Wed, 20 April 2005 06:33 Go to previous message
ntnboi
Messages: 17
Registered: April 2005
Location: Italy - Rome
Junior Member

thank you to all!

I think that use sql script to check user sessions.


Best Regards.
Antonio.
Previous Topic: this query is taking 58 seconds to execute
Next Topic: Analyze table&Index
Goto Forum:
  


Current Time: Tue Jan 19 22:18:48 CST 2021