#!/usr/bin/env python import random i = 100000 while (i > 0): print "SHOW PROCESSLIST; FLUSH TABLES WITH READ LOCK; UNLOCK TABLES;" i -= 1