#!/bin/bash

# Shows all currently running MySQL tasks, except for the Sleeping ones and
# sorts them - showing the longest running query last

echo -e "\n\n\n\n\n\n\n\n\n\n\n" 
echo "show full processlist;" | mysql | grep -v "Sleep"  | sort -n -k 6

