Query OracleCPU usage

Source: Internet
Author: User

Query OracleCPU usage

-- The SQL statements that run a large number of PARSEselect SQL _text, parse_cils, executions from v $ sqlarea order by parse_cils desc; -- select name of the total PARSE of SYS, value from v $ sysstat where name like 'parse count % '; -- select * from v $ osstat for CPU space and busy conditions -- view the CPU usage of each Session: select ss. sid, se. command, ss. value CPU, se. username, se. program from v $ sesstat ss, v $ session se where ss. statistic # in (select statistic # from v $ statname where name = 'cpu used by this session') and se. sid = ss. sid and ss. sid> 6 order by CPU desc; -- compare which session has the most CPU usage time and view the Session details: select s. sid, s. event, s. MACHINE, s. OSUSER, s. wait_time, w. seq #, q. SQL _text from v $ session_wait w, v $ session s, v $ process p, v $ sqlarea q where s. paddr = p. addr and s. sid = & p and s. SQL _address = q. address; -- select s. sid, w. wait_time, w. seconds_in_wait, w. state, w. wait_time_micro, w. time_remaining_micro, w. time_since_last_wait_micro, p. USERNAME, status, server, schemaname, osuser, machine, p. terminal, p. program, logon_time, w. event, w. wait_class, tracefile, SQL _text, last_active_time from v $ session_wait w, v $ session s, v $ process p, v $ sqlarea q where s. paddr = p. addr and s. sid in (select sid from (select ss. sid from v $ sesstat ss, v $ session se where ss. statistic # in (select statistic # from v $ statname where name = 'cpu used by this session') and se. sid = ss. sid and ss. sid> 6 order by ss. value desc) where rownum <11) and s. SQL _address = q. address;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.