Created
April 27, 2015 13:32
-
-
Save andrempo/f5c0a8fafc5dc2318cdd to your computer and use it in GitHub Desktop.
Oracle CPU Usage Per Session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT se.username, se.osuser, ss.sid, ROUND (value/100) "CPU Usage" | |
| FROM v$session se, v$sesstat ss, v$statname st | |
| WHERE ss.statistic# = st.statistic# | |
| AND name LIKE '%CPU used by this session%' | |
| AND se.sid = ss.SID | |
| AND se.username IS NOT NULL | |
| AND ROUND (value/100) > 0 | |
| ORDER BY value DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment