Home » SQL & PL/SQL » SQL & PL/SQL » SQL script to find ACTIVE and INACTIVE CPU on HP-UX server (Oracle 10.2.0.3 - HP-UX IA (64-bit))
SQL script to find ACTIVE and INACTIVE CPU on HP-UX server [message #617123] Wed, 25 June 2014 05:18 Go to next message
hitesh.bhatt
Messages: 84
Registered: February 2014
Location: INDIA
Member
Hello Experts,

Can you please help me with the SQL scripts / dictionary view to check the ACTIVE / INACTIVE CPU on server (HP-UX) if possible?

Thanks in advance.
Re: SQL script to find ACTIVE and INACTIVE CPU on HP-UX server [message #617134 is a reply to message #617123] Wed, 25 June 2014 07:13 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
Look at v$osstat.
Re: SQL script to find ACTIVE and INACTIVE CPU on HP-UX server [message #617139 is a reply to message #617134] Wed, 25 June 2014 07:53 Go to previous messageGo to next message
hitesh.bhatt
Messages: 84
Registered: February 2014
Location: INDIA
Member
No Rows fetched in v$osstat
Re: SQL script to find ACTIVE and INACTIVE CPU on HP-UX server [message #617140 is a reply to message #617139] Wed, 25 June 2014 08:08 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
  1* select * from v$osstat  where stat_name like '%CPU%'
SQL> /

STAT_NAME                                                             VALUE  OSSTAT_ID
---------------------------------------------------------------- ---------- ----------
COMMENTS                                                         CUM
---------------------------------------------------------------- ---
NUM_CPUS                                                                  1          0
Number of active CPUs                                            NO

RSRC_MGR_CPU_WAIT_TIME                                                16146         14
Time (centi-secs) processes spent in the runnable state waiting  YES

NUM_CPU_CORES                                                             1         16
Number of CPU cores                                              NO


STAT_NAME                                                             VALUE  OSSTAT_ID
---------------------------------------------------------------- ---------- ----------
COMMENTS                                                         CUM
---------------------------------------------------------------- ---
NUM_CPU_SOCKETS                                                           1         17
Number of physical CPU sockets                                   NO


SQL> 


Re: SQL script to find ACTIVE and INACTIVE CPU on HP-UX server [message #617141 is a reply to message #617139] Wed, 25 June 2014 08:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Use SQL*Plus and copy and paste like this:
SQL> select * from v$osstat;
STAT_NAME                                                             VALUE  OSSTAT_ID
---------------------------------------------------------------- ---------- ----------
NUM_CPUS                                                                  2          0
IDLE_TIME                                                          58644893          1
BUSY_TIME                                                          11207020          2
USER_TIME                                                           4509915          3
SYS_TIME                                                            6697105          4
AVG_IDLE_TIME                                                      29316524          7
AVG_BUSY_TIME                                                       5597639          8
AVG_USER_TIME                                                       2249080          9
AVG_SYS_TIME                                                     9.2234E+18         10
RSRC_MGR_CPU_WAIT_TIME                                                    0         14
NUM_CPU_CORES                                                             2         16
NUM_CPU_SOCKETS                                                           1         17
PHYSICAL_MEMORY_BYTES                                            3219189760       1008
VM_IN_BYTES                                                      4.4719E+10       1009
VM_OUT_BYTES                                                     1.1910E+10       1010

Re: SQL script to find ACTIVE and INACTIVE CPU on HP-UX server [message #617144 is a reply to message #617139] Wed, 25 June 2014 08:12 Go to previous message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Have a look http://dbaspot.com/database-discussions/55500-10-1-0-3-0-lots-broken-8.html
Previous Topic: Database design for email messaging system
Next Topic: utl_http how to close the request?
Goto Forum:
  


Current Time: Wed Apr 24 20:25:23 CDT 2024