func (t Processlist) Description() string {
count := t.count_rows()
- return fmt.Sprintf("User Information (processlist) %d rows", count)
+ return fmt.Sprintf("Activity by Username (processlist) %d rows", count)
}
func (t Processlist) count_rows() int {
}
row.connections++
// ignore system SQL threads (may be more to filter out)
- if username != "system user" && host != "" && command != "Sleep" && command != "Binlog Dump" {
- row.runtime += t.current[i].TIME
- row.active++
+ if username != "system user" && host != "" && command != "Binlog Dump" {
+ if command == "Sleep" {
+ row.sleeptime += t.current[i].TIME
+ } else {
+ row.runtime += t.current[i].TIME
+ row.active++
+ }
}
if command == "Binlog Dump" && re_active_repl_master_thread.MatchString(state) {
row.active++