CPU,Memory and disk I/O utilization for each query in mysql How can we identify the exact CPU,Memory and disk I/O, when a query is executed. I am using mysql 5.7.20 community version. I am able to get only cpu details for session level by setting SET profiling=1. How can we identify all these details in global level for all the sessions.
Using IOTOP command you can see CPU,Memory and disk I/O utilization for each query. For each query mysql generates an ID. You can find CPU,Memory and disk I/O utilization against your query ID.

How ever you may find more command in detail at http://www.dbatodba.com/db2/useful-aix-commands/monitor-cpu-mem-and-i-o-usage/

SET profiling = 100 
-- Now you can find query ID and running sql query by 
SHOW PROFILES; IF you want TO CHECK IN detail FOR ANY QUERY, run this QUERY- 
-- SHOW PROFILE FOR QUERY QueryID; 
-- If you want to check CPU USAGE for any query, run this query- 
SHOW PROFILE CPU FOR QUERY QueryID;