SELECT SUBSTRING_INDEX(HOST, ':', 1) AS ip, count(*) FROM information_schema. PROCESSLIST GROUP BY ip;