X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=i_s%2Fprocesslist.go;fp=i_s%2Fprocesslist.go;h=81178e9addf7dcb19e4308d74671b9d4c7831ade;hb=19895ca8d31deea9680395e11e889d4b32a58bd4;hp=50d5e922f81364fa946138de185cef8afae1b9dd;hpb=e6dd359976b2f2759f3cb107cf14e23ed30dafd1;p=pstop.git diff --git a/i_s/processlist.go b/i_s/processlist.go index 50d5e92..81178e9 100644 --- a/i_s/processlist.go +++ b/i_s/processlist.go @@ -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++