1

I want to know is there anyway to get CPU usage per user in MySQL? for example I have 3 different users 'user1', 'user2' and 'user3'. I want to get the average/real time memory usage and CPU usage of these users.I googled a lot but I did not find any suitable tool. Maybe I can get these data from MySQL queries, but I don't know where are they stored.

asked May 12, 2019 at 15:43

1 Answer 1

3
answered May 12, 2019 at 15:54
4
  • its show CPU_TIME but i want to have CPU usage in Percentage or Frequency. Commented May 13, 2019 at 6:12
  • @behnambahadori - Does it give enough raw data such that you can compute Percentage or Frequency? Commented May 13, 2019 at 18:01
  • I want to know how can i use raw data to getting CPU usage in Precentage, now i don't have any idea for this issue... Commented May 15, 2019 at 5:17
  • I know how I can get the CPU usage in time (top, ps, user_statistics,...). I want to know is there anyway to convert the %CPU time to cpu core? I run top for 5 seconds after 5 seconds I get 30% for %CPU from top which is 1.5 seconds. and mysql shows 60% within the 5 seconds which means 0.9 seconds is for mysql. Now how can I convert this value to cpu core? for example mysql used 1.2 cores during a 5 secind period Commented May 15, 2019 at 7:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.