Check the number of CPU & cores with SQL statement in Oracle

Check the count of CPU / Cores / Sockets with SQL query in Oracle

Check the count of CPU count with SQL in Oracle

SQL> SELECT value CPU_COUNT FROM v$system_parameter2 WHERE LOWER(name) = 'cpu_count';

CPU_COUNT
------------
8

Check the count of CPU present with SQL in Oracle

SQL> SELECT TO_CHAR(value) num_cpus FROM v$osstat WHERE stat_name = 'NUM_CPUS';

NUM_CPUS
----------
8

Check the count of Cores with SQL in Oracle

SQL> SELECT TO_CHAR(value) num_cores FROM v$osstat WHERE stat_name = 'NUM_CPU_CORES';

NUM_CORES
----------
4

Check the count of Sockets with SQL query in Oracle

SQL> SELECT TO_CHAR(value) num_sockets FROM v$osstat WHERE stat_name = 'NUM_CPU_SOCKETS';

NUM_SOCKET
----------
1
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply