Oracle cpu info ...
VARIABLE bsnap NUMBER
VARIABLE esnap NUMBER
VARIABLE DID NUMBER
VARIABLE INST_NUMBER number
exec select max(snap_id) -1 into :bsnap from dba_hist_snapshot ;
exec select max(snap_id) into :esnap from dba_hist_snapshot ;
exec select DBID into :DID from v$database;
select * from (
select stat_name,value
from dba_hist_osstat
where dbid = :DID
and instance_number = 1
and snap_id = :esnap
) pivot (sum(value) for stat_name in ('NUM_CPUS','NUM_CPU_SOCKETS','NUM_CPU_CORES','PHYSICAL_MEMORY_BYTES','LOAD'))
/
'NUM_CPUS' 'NUM_CPU_SOCKETS' 'NUM_CPU_CORES' 'PHYSICAL_MEMORY_BYTES' 'LOAD'
---------------------- ---------------------- ---------------------- ----------------------- ----------------------
16 2 8 75727392768 0
or
from unix ..
lscpu
No comments:
Post a Comment