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

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

by tuanlp

 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

You may also like