Disclaimer

Saturday, 23 November 2024

SQL query to find CPU and Memory information of Oracle Database server

 

Below script is useful in getting CPU, memory and core, socket information of a database server from SQL prompt.



SCRIPT:

set pagesize 299
set lines 299
select STAT_NAME,to_char(VALUE) as VALUE ,COMMENTS from v$osstat where stat_name IN ('NUM_CPUS','NUM_CPU_CORES','NUM_CPU_SOCKETS')
union
select STAT_NAME,VALUE/1024/1024/1024 || ' GB' ,COMMENTS from v$osstat where stat_name IN ('PHYSICAL_MEMORY_BYTES');




OUTPUT:                       
  
STAT_NAME           VALUE      COMMENTS
---------------     --------  ---------------------------
NUM_CPUS              256      Number of active CPUs
NUM_CPU_CORES         32       Number of CPU cores
NUM_CPU_SOCKETS       4        Number of physical CPU sockets

No comments:

Post a Comment

How to recovery PDB when PDB database is dropped in Oracle

  How to recovery PDB when PDB database is dropped :) [oracle@rac01 ~]$ sqlplus '/as sysdba' SQL*Plus: Release 21.0.0.0.0 - Product...