#!/bin/sh # # From Ubuntu Launchpad bug 27441 posting # vmstat 1 > vmstat.log & vmstatpid=$! top -b -d 1 > top.log & toppid=$! if [ x$1 = x ] then secs=600 else secs=$1 fi sleep $secs echo $vmstatpid $toppid kill -KILL $vmstatpid kill -KILL $toppid