SELECT se.username, ss.sid, ROUND (value/100) "CPU Usage", seconds_in_wait, machine, status 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 ORDER BY value DESC;
And the result would be something like this:
Username SID CPU Wait(s) Machine Status james 2841 81 937 AMAZONA-ABC2 INACTIVE james 1436 68 78 machine1 INACTIVE james 49 61 100 machine2 INACTIVE james 47 45 3297 machine1 INACTIVE james 48 36 4669 machine3 INACTIVE
Now you would ask me what sort of CPU gives you more than 100% total CPU Usage? A multicore one of course..
No comments:
Post a Comment