I'm new to MySQL and I'm trying to write a program that among other things monitors
database usage. I would like to write an SQL query to retrieve info like session id, user
name, cpu usage. Is there any MySQL system tables that gives me this sort of information?
To be more precise, I'm trying to get the MySQL equivalent of the following Oracle SQL:
sesstat.sid as sid,
sess.status as status,
sess.program as program,
aud.name as command,
sesstat.value / 100 as cpu,
statname.statistic# = sesstat.statistic#
sess.sid = sesstat.sid
sess.username is not null
statname.name = 'CPU used by this session'
aud.action = sess.command
Converse com seus amigos em tempo real com o Yahoo! Messenger