Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Finding Oracle Patches with opatch Oracle
  • Find Time Consuming SQL Statements in Oracle 10g Oracle
  • Index Range Scan Oracle
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress
  • Running select from V$ views from remote server Linux/Unix
  • dbinv.sql Oracle
  • oradebug ipcrm ipcs Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • perf_today.sql Oracle
  • OEM-troubleshooting on 20-MAY-08 Oracle
  • online_ts_bkup.sql Oracle
  • Giving Grant on v$DATABASE Oracle
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • Free conference number from http://www.freeconference.com Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle

findinfo.sql (SQL for getting CPU and Active session info)

Posted on 27-May-2025 By Admin No Comments on findinfo.sql (SQL for getting CPU and Active session info)
set lines 120 pages 200
col dd format a20
col inst_id format 99
col metric_name format a30
col value format 99.99
select x.dd, x.inst_id, x.metric_name, x.value "%CPU", y.sess
from
(select to_char(sysdate, 'DD-MON-RRRR:HH24:MI') DD, inst_id, metric_name, value
from gv$sysmetric
where metric_name like 'Host CPU Utilization%' and group_id=2 ) x,
(select inst_id, count(1) sess from gv$session
where status = 'ACTIVE' and osuser != 'oracle'
group by inst_id) y
where x.inst_id = y.inst_id
order by x.inst_id;
Oracle, SQL scripts

Post navigation

Previous Post: SQL Tracker by SID sqltrackerbysid.sql
Next Post: Drop specific SQL plan baseline – spm

Related Posts

  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle
  • 10g oem configuration Oracle
  • plan10g.sql good1 Oracle
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • sql_plan9i.sql Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Search and replace pattern Linux/Unix
  • Processes parameter and its dependencies on OS kernel parameters Linux/Unix
  • Find All internal Parameters Oracle
  • export import with parameter file. Oracle
  • SQLPLUS COPY command Precautions. Oracle
  • restarting network in linux Linux/Unix
  • ORA-00064: object is too large to allocate on this O/S during startup Oracle
  • Oracle Standby Database Library Index from Metalink Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme