ADjust readme and version
[pstop.git] / i_s / processlist.go
index 3c5c258..81178e9 100644 (file)
@@ -70,7 +70,7 @@ func (t Processlist) RowContent(max_rows int) []string {
 
 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 {
@@ -138,9 +138,13 @@ func (t *Processlist) processlist2by_user() {
                }
                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++