Check CPU and memory info of DB server from SQL commands
Check the CPU information
set pagesize 200
set lines 200
col name for a21
col stat_name for a25
col value for a10
col comments for a35
select STAT_NAME,to_char(VALUE) as VALUE ,COMMENTS from v$osstat where
stat_name IN ('NUM_CPUS','NUM_CPU_CORES','NUM_CPU_SOCKETS');
STAT_NAME VALUE COMMENTS ------------------------- ---------- ----------------------------------- NUM_CPUS 8 Number of active CPUs NUM_CPU_CORES 4 Number of CPU cores NUM_CPU_SOCKETS 1 Number of physical CPU sockets
Check the Physical memory info
set pagesize 200
set lines 200
col name for a21
col stat_name for a25
col "Value GB" for 9999.99
col comments for a30
select STAT_NAME,VALUE/1024/1024/1024 "Value GB",COMMENTS from
v$osstat where stat_name IN ('PHYSICAL_MEMORY_BYTES');
STAT_NAME Value GB COMMENTS ------------------------- -------- ------------------------------ PHYSICAL_MEMORY_BYTES 15.86 Physical memory size in bytes
Check free physical memory detail information
set pagesize 200
set lines 200
col name for a21
col stat_name for a25
col "Value GB" for 9999.99
col comments for a30
select STAT_NAME,VALUE/1024/1024/1024 "Value GB" ,COMMENTS from v$osstat where stat_name in ('FREE_MEMORY_BYTES');
STAT_NAME Value GB COMMENTS ------------------------- -------- ------------------------------ FREE_MEMORY_BYTES 7.78 Physical free memory in bytes