in reply to vmstat threshold script

Another trick that I am fond of would be to do the actual vmstat within an open:
open (VMSTAT, "/usr/bin/vmstat 1 10|"); while (<VMSTAT>) { next if ($_ !~ /^ \d+/); (undef,undef,undef,$pos5,$pos6) = split; # CountZero++ push @mylist1, $pos5; push @mylist2, $pos6; }
Also, I'm not familiar with MIME::Lite but I'd look at creating the message without actually creating a temporary file since you just get rid of it anyhow.

JK